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

Michael Smith msmith at xiph.org
Wed May 8 07:02:03 PDT 2002



msmith      02/05/08 07:02:03

  Modified:    src      source.c
  Log:
  Minor fix to previous fix - use the right variable!

Revision  Changes    Path
1.13      +5 -1      icecast/src/source.c

Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- source.c	2002/05/08 05:18:43	1.12
+++ source.c	2002/05/08 14:02:02	1.13
@@ -220,6 +220,9 @@
                                 if (sbytes >= 0) {
                     client->con->sent_bytes += sbytes;
                     if(sbytes != bytes) {
+                        /* We didn't send the entire buffer. Leave it for
+                         * the moment, handle it in the next iteration.
+                         */
                         client->pos += sbytes;
                         refbuf_queue_insert(&client->queue, abuf);
                         data_done = 1;
@@ -255,7 +258,8 @@
                                 sbytes = sock_write_bytes(client->con->sock, refbuf->data, refbuf->len);
                                 if (sbytes >= 0) {
                     client->con->sent_bytes += sbytes;
-                    if(sbytes != bytes) {
+                    if(sbytes != refbuf->len) {
+                        /* Didn't send the entire buffer, queue it */
                         client->pos = sbytes;
                                                 refbuf_addref(refbuf);
                         refbuf_queue_insert(&client->queue, abuf);

<p><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