more work

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@17 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-06-15 15:18:33 +00:00
parent 98f41f1e70
commit 78f386ad45
19 changed files with 269 additions and 201 deletions

View file

@ -78,13 +78,15 @@ static int do_read(struct connection *c) {
chunk.memblock = memblock_new(BUFSIZE);
assert(chunk.memblock);
memblock_stamp(chunk.memblock);
if ((r = iochannel_read(c->io, chunk.memblock->data, BUFSIZE)) <= 0) {
fprintf(stderr, "read(): %s\n", r == 0 ? "EOF" : strerror(errno));
memblock_unref(chunk.memblock);
return -1;
}
chunk.memblock->length = r;
chunk.length = r;
chunk.index = 0;