SOURCES: mpdscribble-warnings_and_operator.patch (NEW) - initial
arvenil
arvenil at pld-linux.org
Thu Sep 4 00:07:48 CEST 2008
Author: arvenil Date: Wed Sep 3 22:07:48 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- initial
---- Files affected:
SOURCES:
mpdscribble-warnings_and_operator.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mpdscribble-warnings_and_operator.patch
diff -u /dev/null SOURCES/mpdscribble-warnings_and_operator.patch:1.1
--- /dev/null Thu Sep 4 00:07:49 2008
+++ SOURCES/mpdscribble-warnings_and_operator.patch Thu Sep 4 00:07:43 2008
@@ -0,0 +1,116 @@
+Patch from http://code.google.com/p/mpdscribble/issues/detail?id=24
+--- mpdscribble-0.2.12/as.c 2008-07-28 20:57:36 +0400
++++ mpdscribble-0.2.12/as.c 2008-07-30 14:39:22 +0400
+@@ -729,7 +729,9 @@
+ unsigned int
+ as_sleep (void)
+ {
++ /*
+ long end;
++ */
+
+ if (!conn_pending ())
+ return sleep (g_sleep);
+--- mpdscribble-0.2.12/conn.c 2008-07-28 20:57:36 +0400
++++ mpdscribble-0.2.12/conn.c 2008-07-30 15:36:06 +0400
+@@ -92,6 +92,7 @@
+ conn_mainloop_quit (void *data)
+ {
+ g_main_loop_quit (g.mainloop);
++ return 0;
+ }
+
+ int
+--- mpdscribble-0.2.12/file.c 2008-07-28 20:57:36 +0400
++++ mpdscribble-0.2.12/file.c 2008-07-30 15:44:49 +0400
+@@ -321,7 +321,7 @@
+ {
+ char *mpd_host = getenv ("MPD_HOST");
+ char *mpd_port = getenv ("MPD_PORT");
+- char *data;
++ char *data = NULL;
+ int i;
+
+ file_config.verbose = -1;
+--- mpdscribble-0.2.12/lmc.c 2008-07-28 20:57:36 +0400
++++ mpdscribble-0.2.12/lmc.c 2008-07-30 15:13:38 +0400
+@@ -39,7 +39,7 @@
+ {
+ char *ch;
+ for (ch = g_mpd->errorStr; *ch; ++ch) {
+- if (*ch=='\n' || *ch=='\t' || *ch=='\r' | *ch=='\v') {
++ if (*ch=='\n' || *ch=='\t' || *ch=='\r' || *ch=='\v') {
+ *ch = ' ';
+ }
+ }
+--- mpdscribble-0.2.12/mbid.c 2008-07-28 20:57:36 +0400
++++ mpdscribble-0.2.12/mbid.c 2008-07-30 15:46:25 +0400
+@@ -72,7 +72,7 @@
+ return size;
+ }
+
+-int mfile(int length, char ret[], FILE *fp, int *s) {
++void mfile(int length, char ret[], FILE *fp, int *s) {
+ int bytes = fread(ret,1,length,fp);
+
+ if (bytes != length) {
+@@ -151,6 +151,9 @@
+ }
+
+ int bytes = fread (data, 1, OGG_MAX_CHUNK_SIZE, fp);
++ if (bytes != OGG_MAX_CHUNK_SIZE)
++ goto ogg_failed;
++
+ int marker_size = strlen (marker);
+
+ int offset = -1;
+@@ -203,7 +206,10 @@
+ int bytes;
+ unsigned char header[4];
+
+- fread (header, 1, 4, fp);
++ bytes = fread (header, 1, 4, fp);
++ if (bytes != 4)
++ return -1;
++
+ size = header[3] | header[2]<<0x08 | header[1]<<0x10;
+
+ if ((header[0] & 0x7F) == 0x04)
+@@ -311,13 +317,12 @@
+
+ mfile(2,version,fp,&s);
+ int version_major = (int)version[0];
+- int version_minor = (int)version[1];
+ if (version_major == 2) {
+ debug("ID3v2.2.0 does not support MBIDs: %s\n",path);
+ break;
+ }
+ if (version_major != 3 && version_major != 4) {
+- debug("Unsupported ID3 version: v2.%d.%d\n",version_major,version_minor);
++ debug("Unsupported ID3 version: v2.%d.%d\n",version_major,(int)version[1]);
+ break;
+ }
+
+--- mpdscribble-0.2.12/mpdscribble.c 2008-07-28 20:57:36 +0400
++++ mpdscribble-0.2.12/mpdscribble.c 2008-07-30 15:59:40 +0400
+@@ -23,6 +23,7 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <unistd.h>
+
+ #include "file.h"
+ #include "misc.h"
+@@ -149,11 +150,10 @@
+
+ submitted = 1;
+
+- if (file_config.musicdir)
++ if (file_config.musicdir && chdir (file_config.musicdir) != 0)
+ {
+ // yeah, I know i'm being silly, but I can't be arsed to
+ // concat the parts :P
+- chdir (file_config.musicdir);
+ if (getMBID (song.file, mbid))
+ mbid[0] = 0x00;
+ else
================================================================
More information about the pld-cvs-commit
mailing list