[xiph-commits] r7319 - icecast/trunk/libshout/src
brendan at dactyl.lonelymoon.com
brendan
Sat Jul 24 14:26:38 PDT 2004
Author: brendan
Date: Sat Jul 24 14:26:38 2004
New Revision: 7319
Modified:
icecast/trunk/libshout/src/shout.c
Log:
try_write: write data, not queue struct. This only seemed to work
because data was at the front of the queue.
queue_data: advance data ptr when paging, so we don't just keep
writing the head to each node. D'oh.
Modified: icecast/trunk/libshout/src/shout.c
===================================================================
--- icecast/trunk/libshout/src/shout.c 2004-07-24 16:59:19 UTC (rev 7318)
+++ icecast/trunk/libshout/src/shout.c 2004-07-24 21:26:36 UTC (rev 7319)
@@ -41,6 +41,7 @@
/* -- local prototypes -- */
static int queue_data(shout_t *self, const unsigned char *data, size_t len);
static int queue_str(shout_t *self, const char *str);
+static int send_queue(shout_t *self);
static int try_write (shout_t *self, const void *data, size_t len);
static int login_xaudiocast(shout_t *self);
@@ -790,6 +791,7 @@
plen = len > SHOUT_BUFSIZE - buf->len ? SHOUT_BUFSIZE - buf->len : len;
memcpy (buf->data + buf->len, data, plen);
buf->len += plen;
+ data += plen;
len -= plen;
}
@@ -863,7 +865,7 @@
buf = self->queue;
while (buf) {
- ret = try_write (self, buf + buf->pos, buf->len - buf->pos);
+ ret = try_write (self, buf->data + buf->pos, buf->len - buf->pos);
if (ret < 0)
return self->error;
More information about the commits
mailing list