[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] fix a seg fault, add another XXX for nick ;)



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	dirserv.c main.c routerlist.c 
Log Message:
fix a seg fault, add another XXX for nick ;)


Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- dirserv.c	18 May 2004 15:35:21 -0000	1.48
+++ dirserv.c	18 May 2004 16:54:04 -0000	1.49
@@ -333,6 +333,7 @@
     /* Add this at the end. */
     if (n_descriptors >= MAX_ROUTERS_IN_DIR) {
       log_fn(LOG_WARN,"Too many descriptors in directory; can't add another.");
+      return -1;
     } else {
       log_fn(LOG_INFO,"Dirserv adding desc for nickname %s",ri->nickname);
       desc_ent_ptr = &descriptor_list[n_descriptors++];

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- main.c	18 May 2004 15:35:21 -0000	1.269
+++ main.c	18 May 2004 16:54:04 -0000	1.270
@@ -215,7 +215,7 @@
     connection_handle_read(conn) < 0) {
       if (!conn->marked_for_close) {
         /* this connection is broken. remove it */
-        log_fn(LOG_ERR,"Unhandled error on read for %s connection (fd %d); removing",
+        log_fn(LOG_WARN,"Unhandled error on read for %s connection (fd %d); removing",
                CONN_TYPE_TO_STRING(conn->type), conn->s);
         connection_mark_for_close(conn);
       }
@@ -248,6 +248,7 @@
       log_fn(LOG_WARN,"Unhandled error on read for %s connection (fd %d); removing",
              CONN_TYPE_TO_STRING(conn->type), conn->s);
       conn->has_sent_end = 1; /* otherwise we cry wolf about duplicate close */
+      /* XXX do we need a close-immediate here, so we don't try to flush? */
       connection_mark_for_close(conn);
     }
   }

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- routerlist.c	17 May 2004 20:41:40 -0000	1.77
+++ routerlist.c	18 May 2004 16:54:04 -0000	1.78
@@ -323,7 +323,7 @@
           /* Remember whether we trust this router as a dirserver. */
           if (r->is_trusted_dir)
             router->is_trusted_dir = 1;
-          /* If the adress hasn't changed; no need to re-resolve. */
+          /* If the address hasn't changed; no need to re-resolve. */
           if (!strcasecmp(r->address, router->address))
             router->addr = r->addr;
           routerinfo_free(r);