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

Michael Smith msmith at xiph.org
Fri Aug 16 08:28:47 PDT 2002



msmith      02/08/16 11:28:47

  Modified:    src      client.c connection.c
  Log:
  Minor fixes for logging response codes correctly (hopefully)

Revision  Changes    Path
1.4       +2 -0      icecast/src/client.c

Index: client.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/client.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- client.c	16 Aug 2002 14:26:47 -0000	1.3
+++ client.c	16 Aug 2002 15:28:46 -0000	1.4
@@ -52,6 +52,7 @@
             "Content-Type: text/html\r\n\r\n"
             "<b>%s</b>\r\n", message);
     if(bytes > 0) client->con->sent_bytes = bytes;
+    client->respcode = 404;
     client_destroy(client);
 }
 
@@ -62,5 +63,6 @@
             "\r\n"
             "You need to authenticate\r\n");
     if(bytes > 0) client->con->sent_bytes = bytes;
+    client->respcode = 401;
     client_destroy(client);
 }

<p><p>1.25      +2 -0      icecast/src/connection.c

Index: connection.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- connection.c	16 Aug 2002 14:55:56 -0000	1.24
+++ connection.c	16 Aug 2002 15:28:46 -0000	1.25
@@ -319,6 +319,7 @@
                 WARN0("No content-type header, cannot handle source");
         goto fail;
         }
+    client->respcode = 200;
     bytes = sock_write(client->con->sock, 
             "HTTP/1.0 200 OK\r\n\r\n");
     if(bytes > 0) client->con->sent_bytes = bytes;
@@ -506,6 +507,7 @@
             /* If the file exists, then transform it, otherwise, write a 404 */
             if (stat(fullpath, &statbuf) == 0) {
             DEBUG0("Stats request, sending XSL transformed stats");
+            client->respcode = 200;
                     bytes = sock_write(client->con->sock, 
                     "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n");
             if(bytes > 0) client->con->sent_bytes = bytes;

<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