[xiph-cvs] cvs commit: ices/src stream_shared.c
Michael Smith
msmith at xiph.org
Tue Aug 13 07:03:20 PDT 2002
msmith 02/08/13 10:03:20
Modified: src stream_shared.c
Log:
Error returns need to come earlier for a couple of cases (patch from Karl Heyes)
Revision Changes Path
1.11 +9 -5 ices/src/stream_shared.c
Index: stream_shared.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/stream_shared.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- stream_shared.c 3 Aug 2002 12:11:57 -0000 1.10
+++ stream_shared.c 13 Aug 2002 14:03:20 -0000 1.11
@@ -1,7 +1,7 @@
/* stream_shared.c
* - Stream utility functions.
*
- * $Id: stream_shared.c,v 1.10 2002/08/03 12:11:57 msmith Exp $
+ * $Id: stream_shared.c,v 1.11 2002/08/13 14:03:20 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -146,8 +146,10 @@
encode_finish(sdsc->enc);
while(encode_flush(sdsc->enc, &og) != 0)
{
- ret = stream_send_data(sdsc, og.header, og.header_len);
- ret = stream_send_data(sdsc, og.body, og.body_len);
+ if ((ret = stream_send_data(sdsc, og.header, og.header_len)) == 0)
+ return 0;
+ if ((ret = stream_send_data(sdsc, og.body, og.body_len)) == 0)
+ return 0;
}
encode_clear(sdsc->enc);
@@ -196,8 +198,10 @@
while(encode_dataout(sdsc->enc, &og) > 0)
{
- ret = stream_send_data(sdsc, og.header, og.header_len);
- ret = stream_send_data(sdsc, og.body, og.body_len);
+ if ((ret = stream_send_data(sdsc, og.header, og.header_len)) == 0)
+ return 0;
+ if ((ret = stream_send_data(sdsc, og.body, og.body_len)) == 0)
+ return 0;
}
return ret;
<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