]> andersk Git - moira.git/blobdiff - gdb/gdb_ops.c
Fixed polarity of USELOCALTOOLS
[moira.git] / gdb / gdb_ops.c
index fadff75913599126a092ec42280815743d27a380..68756dfb76c3ee7683638024f49aee78bac452fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
- *     $Source$
- *     $Header$
+ * $Source$
+ * $Header$
  */
 
 #ifndef lint
@@ -8,56 +8,44 @@ static char *rcsid_gdb_ops_c = "$Header$";
 #endif lint
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*     
-/*                        gdb_ops.c
-/*     
-/*           GDB - Asynchronous Operations and Their Synchronous
-/*                 Counterparts
-/*     
-/*     Author: Noah Mendelsohn
-/*     Copyright: 1986 MIT Project Athena 
-/*     
-/*     These routines provide a suite of asynchronous operations 
-/*     on connections.
-/*     
-/************************************************************************/
-
+/************************************************************************
+ *     
+ *                        gdb_ops.c
+ *     
+ *           GDB - Asynchronous Operations and Their Synchronous
+ *                 Counterparts
+ *     
+ *     Author: Noah Mendelsohn
+ *     Copyright: 1986 MIT Project Athena 
+ *             For copying and distribution information, please see
+ *             the file <mit-copyright.h>.
+ *     
+ *     These routines provide a suite of asynchronous operations 
+ *     on connections.
+ *     
+ ************************************************************************/
+
+#include <mit-copyright.h>
 #include <stdio.h>
 #include "gdb.h"
 #include <netinet/in.h>
 #include <sys/ioctl.h>
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
 #ifdef vax
 extern u_long htonl();
 #endif vax
-\f
-/************************************************************************/
-/*     
-/*                     send_object (send_object)
-/*     
-/*     Synchronous form of start_sending_object.  Returns either
-/*     OP_CANCELLED, or OP_RESULT(op).
-/*     
-/************************************************************************/
+
+
+/************************************************************************
+ *     
+ *                     send_object (send_object)
+ *     
+ *     Synchronous form of start_sending_object.  Returns either
+ *     OP_CANCELLED, or OP_RESULT(op).
+ *     
+ ************************************************************************/
 
 int
 send_object(con, objp, type)
@@ -79,7 +67,8 @@ int type;
        delete_operation(op);
        return retval;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_send_object (g_snobj)
@@ -219,6 +208,7 @@ struct obj_data *arg;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_csnobj(op, hcon, arg)
 OPERATION op;
@@ -232,7 +222,7 @@ struct obj_data *arg;
        return OP_COMPLETE;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     receive_object (receive_object)
@@ -261,7 +251,8 @@ int type;
        delete_operation(op);
        return retval;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_receiving_object (g_rcobj)
@@ -428,8 +419,12 @@ struct robj_data *arg;
         * to local byte order, and allocate the space for the receive.
         */
        arg->len = (int) ntohl((u_long)arg->len);
+       if (arg->len > 65536)
+         return OP_CANCELLED;
 
        arg->flattened = db_alloc(arg->len);
+       if (arg->flattened == NULL)
+         return OP_CANCELLED;
        /*
         * Now start receiving the encoded object itself.  If it all comes in
         * synchronously, then just go on to the c2 routine to decode it and
@@ -470,7 +465,8 @@ struct robj_data *arg;
        db_free((char *)arg, sizeof(struct robj_data)); /* free the state structure */
        return OP_COMPLETE;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     complete_operation(complete_operation)
@@ -503,7 +499,7 @@ OPERATION op;
 
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     cancel_operation(cancel_operation)
@@ -544,7 +540,8 @@ OPERATION op;
 
        return OP_CANCELLED;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_listening
@@ -568,7 +565,7 @@ struct lis_data {
 int g_ilis();
 int g_clis();
 
-int
+void
 gdb_start_listening(op, con, otherside, lenp, fdp)
 OPERATION op;
 CONNECTION con;
@@ -650,6 +647,7 @@ struct lis_data *arg;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_clis(op, hcon, arg)
 OPERATION op;
@@ -662,7 +660,7 @@ struct lis_data *arg;
        return OP_COMPLETE;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     start_accepting_client
@@ -705,7 +703,7 @@ struct acc_data {
 int g_iacc();
 int g_i2acc();
 
-int
+void
 start_accepting_client(listencon, op, conp, otherside, lenp, tuplep)
 CONNECTION listencon;
 OPERATION op;
@@ -767,6 +765,7 @@ TUPLE *tuplep;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_iacc(op, hcon, arg)
 OPERATION op;
@@ -871,6 +870,7 @@ struct acc_data *arg;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_i2acc(op, hcon, arg)
 OPERATION op;
This page took 0.050856 seconds and 4 git commands to generate.