]> andersk Git - moira.git/blobdiff - gdb/gdb_serv.c
#include file and prototype fixes
[moira.git] / gdb / gdb_serv.c
index 4d2721ad44f3590069c1af256e5f6bcb086fea98..11ec00ac24bca28bc130eb37a8124c7a5816ccd4 100644 (file)
@@ -1,58 +1,45 @@
 /*
- *     $Source$
- *     $Header$
+ * $Source$
+ * $Header$
  */
 
 #ifndef lint
 static char *rcsid_gdb_serv_c = "$Header$";
-#endif lint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*     
-/*                        gdb_serv.c
-/*     
-/*           GDB - Routines to implement the server/client model
-/*                 of connections.
-/*     
-/*     Author: Noah Mendelsohn
-/*     Copyright: 1986 MIT Project Athena 
-/*             For copying and distribution information, please see
-/*             the file <mit-copyright.h>.
-/*     
-/************************************************************************/
+#endif
+
+
+/************************************************************************
+ *     
+ *                        gdb_serv.c
+ *     
+ *           GDB - Routines to implement the server/client model
+ *                 of connections.
+ *     
+ *     Author: Noah Mendelsohn
+ *     Copyright: 1986 MIT Project Athena 
+ *             For copying and distribution information, please see
+ *             the file <mit-copyright.h>.
+ *     
+ ************************************************************************/
 
 #include <mit-copyright.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include "gdb.h"
 #include <sys/ioctl.h>
-
-       /*----------------------------------------------------------*/
-       /*      
-       /*      The following field names and types describe the
-       /*      tuple sent from clients to servers during negotiation.
-       /*      
-       /*----------------------------------------------------------*/
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
+#ifdef POSIX
+#include <unistd.h>
+#endif
+
+       /*----------------------------------------------------------
+        *      
+        *      The following field names and types describe the
+        *      tuple sent from clients to servers during negotiation.
+        *      
+        *----------------------------------------------------------*/
 
 char *g_tsv_field_names[] = {"server_id",
                            "parms",
@@ -92,7 +79,7 @@ FIELD_TYPE g_fsv_ftypes[] = {INTEGER_T,
 #define FSV_SERVER_ID   1
 #define FSV_PARMS       2
 
-\f
+
 /************************************************************************/
 /*     
 /*                       gdb_i_srv
@@ -118,7 +105,7 @@ gdb_i_srv()
        gdb_socklen = sizeof(gdb_sockaddr_of_client);
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                start_server_connection (start_server_connection)
@@ -232,7 +219,7 @@ char *parms;
                return NULL;
        }
 }
-\f
+
 /************************************************************************/
 /*     
 /*                          g_try_server
@@ -294,7 +281,7 @@ TUPLE *responsep;
        return;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     g_ask_server
@@ -333,6 +320,7 @@ TUPLE *responsep;
        (void) strcpy(STRING_DATA(*((STRING *)FIELD_FROM_TUPLE(out_tuple,0))),
                       server_id);
 
+       if (parms == NULL) parms = "";
        (void) string_alloc((STRING *)FIELD_FROM_TUPLE(out_tuple, TSV_PARMS),
                     strlen(parms)+1);
        (void) strcpy(STRING_DATA(*((STRING *)FIELD_FROM_TUPLE(out_tuple,1))),
@@ -380,7 +368,8 @@ TUPLE *responsep;
                                                /* CON_STOPPING with errno */
        }
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_replying_to_client
This page took 0.218571 seconds and 4 git commands to generate.