[xiph-cvs] cvs commit: libshout/src shout.c vorbis.c

Michael Smith msmith at xiph.org
Fri Nov 22 05:02:00 PST 2002



msmith      02/11/22 08:02:00

  Modified:    .        configure.in
               src      shout.c vorbis.c
  Log:
  More bugfixes

Revision  Changes    Path
1.7       +3 -0      libshout/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/configure.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configure.in	16 Aug 2002 14:22:16 -0000	1.6
+++ configure.in	22 Nov 2002 13:01:59 -0000	1.7
@@ -83,6 +83,9 @@
 ])
 
 dnl Checks for library functions.
+AC_CHECK_FUNCS(nanosleep)
+AC_CHECK_FUNCS(sethostent endhostent)
+AC_CHECK_FUNCS(getnameinfo getaddrinfo inet_pton)
 
 dnl Make substitutions
 

<p><p>1.13      +13 -10    libshout/src/shout.c

Index: shout.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/shout.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- shout.c	5 Oct 2002 14:53:09 -0000	1.12
+++ shout.c	22 Nov 2002 13:02:00 -0000	1.13
@@ -159,26 +159,29 @@
         if (!self) 
                 return -1;
 
+    self->error = SHOUTERR_SUCCESS;
+
         while(remaining) {
                 ret = sock_write_bytes(self->socket, data, remaining);
-        if(ret < (ssize_t)remaining || errno == EINTR) {
-            remaining -= (ret>0)?ret:0;
-            continue;
-        }
+        if(ret == (ssize_t)remaining)
+            return len;
         else if(ret < 0) {
-            self->error = SHOUTERR_SOCKET;
-            return -1;
+            if(errno == EINTR)
+                ret = 0;
+            else {
+                self->error = SHOUTERR_SOCKET;
+                return -1;
+            }
         }
-        remaining = 0;
+        remaining -= ret;
         }
 
-	self->error = SHOUTERR_SUCCESS;
         return len;
 }
 
 void shout_sync(shout_t *self)
 {
-	uint64_t sleep;
+	int64_t sleep;
 
         if (!self)
                 return;
@@ -189,7 +192,7 @@
         sleep = ((double)self->senttime / 1000) - (timing_get_time() - self->starttime);
 
         if (sleep > 0)
-		timing_sleep(sleep);
+		timing_sleep((uint64_t)sleep);
 }
 
 int shout_get_errno(shout_t *self)

<p><p>1.3       +1 -0      libshout/src/vorbis.c

Index: vorbis.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/vorbis.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vorbis.c	23 Jan 2002 03:11:50 -0000	1.2
+++ vorbis.c	22 Nov 2002 13:02:00 -0000	1.3
@@ -1,6 +1,7 @@
 /* vorbis.c: Ogg Vorbis data handlers for libshout */
 
 #include <stdlib.h>
+#include <string.h>
 
 #include <ogg/ogg.h>
 #include <vorbis/codec.h>

<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