[xiph-cvs] cvs commit: icecast/src connection.c

Michael Smith msmith at xiph.org
Wed Feb 12 14:50:59 PST 2003



msmith      03/02/12 17:50:59

  Modified:    src      connection.c
  Log:
  Increase buffer size for IPs so that logging works better for v6 clients.

Revision  Changes    Path
1.48      +3 -3      icecast/src/connection.c

Index: connection.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- connection.c	11 Feb 2003 14:23:34 -0000	1.47
+++ connection.c	12 Feb 2003 22:50:59 -0000	1.48
@@ -125,10 +125,10 @@
                 return NULL;
         }
 
-	/* malloc enough room for 123.123.123.123\0 (TODO: ipv6?)*/
-	ip = (char *)malloc(16);
+	/* malloc enough room for a full IP address (including ipv6) */
+	ip = (char *)malloc(40);
 
-	sock = sock_accept(global.serversock, ip, 16);
+	sock = sock_accept(global.serversock, ip, 40);
         if (sock >= 0) {
                 con = create_connection(sock, ip);
 

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list