* Supply a NULL argument as the second argument to accept() instead of an
authorArt Cancro <ajc@citadel.org>
Mon, 17 Mar 2003 04:03:14 +0000 (04:03 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 17 Mar 2003 04:03:14 +0000 (04:03 +0000)
  empty buffer whose contents we never even look at.

citadel/ChangeLog
citadel/sysdep.c

index 2ee55241e981252ca29be607413da8e1b31dcb6d..950d2dfd639136e95c8640a8df5d31b55c32eb7b 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 605.20  2003/03/17 04:03:14  ajc
+ * Supply a NULL argument as the second argument to accept() instead of an
+   empty buffer whose contents we never even look at.
+
  Revision 605.19  2003/03/16 05:07:12  ajc
  * Fixed the bug that caused freebusy publishes to crash.
 
@@ -4562,4 +4566,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 401f04d3877744be9abd46eccdbfe23053bd0139..243c299979dbac4ef69a089f1c23a82cb352b6a1 100644 (file)
@@ -932,8 +932,6 @@ void *worker_thread(void *arg) {
        int retval;
        struct CitContext *con= NULL;   /* Temporary context pointer */
        struct ServiceFunctionHook *serviceptr;
-       struct sockaddr_in fsin;        /* Data for master socket */
-       int alen;                       /* Data for master socket */
        int ssock;                      /* Descriptor for client socket */
        struct timeval tv;
 
@@ -1000,9 +998,7 @@ SETUP_FD:  memcpy(&readfds, &masterfds, sizeof masterfds);
                     serviceptr = serviceptr->next ) {
 
                        if (FD_ISSET(serviceptr->msock, &readfds)) {
-                               alen = sizeof fsin;
-                               ssock = accept(serviceptr->msock,
-                                       (struct sockaddr *)&fsin, &alen);
+                               ssock = accept(serviceptr->msock, NULL, 0);
                                if (ssock < 0) {
                                        lprintf(2, "citserver: accept(): %s\n",
                                                strerror(errno));