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

Michael Smith msmith at xiph.org
Fri Feb 14 03:44:08 PST 2003



msmith      03/02/14 06:44:08

  Modified:    src      client.c
  Log:
  Fix bad log entries from relaying.

Revision  Changes    Path
1.6       +6 -3      icecast/src/client.c

Index: client.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/client.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- client.c	31 Dec 2002 06:28:38 -0000	1.5
+++ client.c	14 Feb 2003 11:44:08 -0000	1.6
@@ -19,7 +19,7 @@
 
 client_t *client_create(connection_t *con, http_parser_t *parser)
 {
-	client_t *client = (client_t *)malloc(sizeof(client_t));
+	client_t *client = (client_t *)calloc(1, sizeof(client_t));
 
         client->con = con;
         client->parser = parser;
@@ -33,8 +33,11 @@
 {
         refbuf_t *refbuf;
 
-	/* write log entry */
-	logging_access(client);
+	/* write log entry if ip is set (some things don't set it, like outgoing 
+     * slave requests
+     */
+    if(client->con->ip)
+    	logging_access(client);
         
         connection_close(client->con);
         httpp_destroy(client->parser);

<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