summaryrefslogtreecommitdiff
blob: 98a52c4c00e13bfd8b5b860e04bdc4af45fb7b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- libcdaudio-0.99.6/source/cddb.c.orig	2002-12-16 23:18:40.000000000 +0100
+++ libcdaudio-0.99.6/source/cddb.c	2002-12-16 23:20:38.000000000 +0100
@@ -840,7 +840,7 @@
     inbuffer[index] = inchar;
   }
   
-  fprintf(stdout, "%*s\n", index, index, inbuffer); 
+  fprintf(stdout, "%*s\n", index, inbuffer); 
   return index;
 }
 
@@ -916,7 +916,7 @@
   free(outbuffer);
    
   if(mode == CDDB_MODE_HTTP)
-    cddb_skip_http_header(sock);
+    if (cddb_skip_http_header(sock)<0) return -1;
 
   if((inbuffer = malloc(256)) == NULL)
     return -1;
@@ -1160,11 +1160,15 @@
 	     cddb_genre(entry->entry_genre),
 	     entry->entry_id);
 	
-  send(sock, outbuffer, strlen(outbuffer), 0);
+  if(send(sock, outbuffer, strlen(outbuffer), 0)<0) {
+    free(outbuffer);
+    return -1;
+  }
+
   free(outbuffer);
    
   if(mode == CDDB_MODE_HTTP)
-    cddb_skip_http_header(sock);
+    if (cddb_skip_http_header(sock)<0) return -1;
 
   if(cddb_read_token(sock, token) < 0)
     return -1;