* Let the reader beware.
*
* $Log$
- * Revision 1.7 1987-06-08 02:44:44 wesommer
- * Minor lint fix.
+ * Revision 1.8 1987-06-09 18:44:45 wesommer
+ * modified error handling.
*
+ * Revision 1.7 87/06/08 02:44:44 wesommer
+ * Minor lint fix.
+ *
* Revision 1.6 87/06/03 17:41:00 wesommer
* Added startup support.
*
com_err(whoami, 0, "GDB initialization failed.");
exit(1);
}
-
+ gdb_debug(0); /* this can be patched, if necessary, to enable */
+ /* GDB level debugging .. */
+
/*
* Database initialization.
*/
* Handle any new connections.
*/
if (OP_DONE(listenop)) {
- if ((status = new_connection()) != 0) {
+ if (OP_STATUS(listenop) == OP_CANCELLED) {
+ com_err(whoami, errno, "Error on listen");
+ exit(1);
+
+ } else if ((status = new_connection()) != 0) {
com_err(whoami, errno,
"Error on listening operation.");
/*
int
new_connection()
{
- register client *cp = (client *)malloc(sizeof *cp);
+ register client *cp;
static counter = 0;
/*
/*
* Set up the new connection and reply to the client
*/
-
+ cp = (client *)malloc(sizeof *cp);
cp->state = CL_STARTING;
cp->action = CL_ACCEPT;
cp->con = newconn;
reset_operation(cp->pending_op);
delete_operation(cp->pending_op);
+ sever_connection(cp->con);
free((char *)cp);
}