[pulseaudio-commits] r1428 - /trunk/src/pulsecore/protocol-esound.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Feb 14 01:27:20 PST 2007
Author: ossman
Date: Wed Feb 14 10:27:19 2007
New Revision: 1428
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1428&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Allow a formatted string in the validation warning.
Modified:
trunk/src/pulsecore/protocol-esound.c
Modified: trunk/src/pulsecore/protocol-esound.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/protocol-es=
ound.c?rev=3D1428&root=3Dpulseaudio&r1=3D1427&r2=3D1428&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/pulsecore/protocol-esound.c (original)
+++ trunk/src/pulsecore/protocol-esound.c Wed Feb 14 10:27:19 2007
@@ -280,9 +280,9 @@
return format;
}
=
-#define CHECK_VALIDITY(expression, string) do { \
+#define CHECK_VALIDITY(expression, ...) do { \
if (!(expression)) { \
- pa_log_warn(__FILE__ ": " string); \
+ pa_log_warn(__FILE__ ": " __VA_ARGS__); \
return -1; \
} \
} while(0);
@@ -350,7 +350,7 @@
=
if (c->protocol->sink_name) {
sink =3D pa_namereg_get(c->protocol->core, c->protocol->sink_name,=
PA_NAMEREG_SINK, 1);
- CHECK_VALIDITY(sink, "No such sink");
+ CHECK_VALIDITY(sink, "No such sink: %s", c->protocol->sink_name);
}
=
strncpy(name, data, sizeof(name));
@@ -719,7 +719,7 @@
sc_length =3D MAYBE_INT32_SWAP(c->swap_byte_order, sc_length);
data =3D (const char*)data + sizeof(int32_t);
=
- CHECK_VALIDITY(sc_length <=3D MAX_CACHE_SAMPLE_SIZE, "Sample too large=
.");
+ CHECK_VALIDITY(sc_length <=3D MAX_CACHE_SAMPLE_SIZE, "Sample too large=
(%d bytes).", (int)sc_length);
=
strcpy(name, SCACHE_PREFIX);
strncpy(name+sizeof(SCACHE_PREFIX)-1, data, ESD_NAME_MAX);
More information about the pulseaudio-commits
mailing list