[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test1-26-gb174a51
Lennart Poettering
gitmailer-noreply at 0pointer.de
Wed Jul 1 05:25:50 PDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from cd70d7f5b05778d810382c88695fa295a8557c4e (commit)
- Log -----------------------------------------------------------------
b174a51 libpulse: minor cleanups
a10b7cd native: don't hit assert when user uploads zero-sized sample
-----------------------------------------------------------------------
Summary of changes:
src/pulse/context.c | 30 +++++++++++++++++++-----------
src/pulsecore/protocol-native.c | 4 +++-
2 files changed, 22 insertions(+), 12 deletions(-)
-----------------------------------------------------------------------
commit a10b7cda4eb9aaa0523c429621bb31fd1246cc05
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jul 1 14:25:13 2009 +0200
native: don't hit assert when user uploads zero-sized sample
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index cda7ef5..96184bd 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -2689,7 +2689,9 @@ static void command_finish_upload_stream(pa_pdispatch *pd, uint32_t command, uin
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
CHECK_VALIDITY(c->pstream, upload_stream_isinstance(s), tag, PA_ERR_NOENTITY);
- if (pa_scache_add_item(c->protocol->core, s->name, &s->sample_spec, &s->channel_map, &s->memchunk, s->proplist, &idx) < 0)
+ if (!s->memchunk.memblock)
+ pa_pstream_send_error(c->pstream, tag, PA_ERR_TOOLARGE);
+ else if (pa_scache_add_item(c->protocol->core, s->name, &s->sample_spec, &s->channel_map, &s->memchunk, s->proplist, &idx) < 0)
pa_pstream_send_error(c->pstream, tag, PA_ERR_INTERNAL);
else
pa_pstream_send_simple_ack(c->pstream, tag);
commit b174a511207d67896800ae82a5797dcda1ec2780
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jul 1 14:26:07 2009 +0200
libpulse: minor cleanups
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 505e758..4ded556 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -761,22 +761,33 @@ static void track_pulseaudio_on_dbus(pa_context *c, DBusBusType type, pa_dbus_wr
pa_assert(conn);
dbus_error_init(&error);
+
if (!(*conn = pa_dbus_wrap_connection_new(c->mainloop, c->use_rtclock, type, &error)) || dbus_error_is_set(&error)) {
pa_log_warn("Unable to contact DBUS: %s: %s", error.name, error.message);
- goto finish;
+ goto fail;
}
if (!dbus_connection_add_filter(pa_dbus_wrap_connection_get(*conn), filter_cb, c, NULL)) {
pa_log_warn("Failed to add filter function");
- goto finish;
+ goto fail;
}
if (pa_dbus_add_matches(
pa_dbus_wrap_connection_get(*conn), &error,
- "type='signal',sender='" DBUS_SERVICE_DBUS "',interface='" DBUS_INTERFACE_DBUS "',member='NameOwnerChanged',arg0='org.pulseaudio.Server',arg1=''", NULL) < 0)
+ "type='signal',sender='" DBUS_SERVICE_DBUS "',interface='" DBUS_INTERFACE_DBUS "',member='NameOwnerChanged',arg0='org.pulseaudio.Server',arg1=''", NULL) < 0) {
+
pa_log_warn("Unable to track org.pulseaudio.Server: %s: %s", error.name, error.message);
+ goto fail;
+ }
+
+ return;
+
+fail:
+ if (*conn) {
+ pa_dbus_wrap_connection_free(*conn);
+ *conn = NULL;
+ }
- finish:
dbus_error_free(&error);
}
#endif
@@ -861,7 +872,7 @@ static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userd
c->client = NULL;
if (!io) {
- /* Try the item in the list */
+ /* Try the next item in the list */
if (saved_errno == ECONNREFUSED ||
saved_errno == ETIMEDOUT ||
saved_errno == EHOSTUNREACH) {
@@ -897,7 +908,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
/* FIXME: We probably should check if this is actually the NameOwnerChanged we were looking for */
is_session = c->session_bus && bus == pa_dbus_wrap_connection_get(c->session_bus);
- pa_log_debug("Rock!! PulseAudio is back on %s bus", is_session ? "session" : "system");
+ pa_log_debug("Rock!! PulseAudio might be back on %s bus", is_session ? "session" : "system");
if (is_session)
/* The user instance via PF_LOCAL */
@@ -937,7 +948,7 @@ int pa_context_connect(
pa_context_ref(c);
- c->no_fail = flags & PA_CONTEXT_NOFAIL;
+ c->no_fail = !!(flags & PA_CONTEXT_NOFAIL);
c->server_specified = !!server;
pa_assert(!c->server_list);
@@ -954,10 +965,7 @@ int pa_context_connect(
/* Follow the X display */
if ((d = getenv("DISPLAY"))) {
- char *e;
- d = pa_xstrdup(d);
- if ((e = strchr(d, ':')))
- *e = 0;
+ d = pa_xstrndup(d, strcspn(d, ":"));
if (*d)
c->server_list = pa_strlist_prepend(c->server_list, d);
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list