mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
improve error handling
This commit is contained in:
parent
8cda0dd962
commit
b2992a0f8a
2 changed files with 7 additions and 3 deletions
|
|
@ -1708,6 +1708,10 @@ static DBusHandlerResult profile_new_connection(DBusConnection *conn, DBusMessag
|
||||||
|
|
||||||
asprintf(&pathfd, "%s/fd%d", path, fd);
|
asprintf(&pathfd, "%s/fd%d", path, fd);
|
||||||
t = transport_create(monitor, pathfd, sizeof(struct transport_data));
|
t = transport_create(monitor, pathfd, sizeof(struct transport_data));
|
||||||
|
if (t == NULL) {
|
||||||
|
spa_log_warn(monitor->log, "can't create transport: %m");
|
||||||
|
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||||
|
}
|
||||||
spa_bt_transport_set_implementation(t, &sco_transport_impl, t);
|
spa_bt_transport_set_implementation(t, &sco_transport_impl, t);
|
||||||
|
|
||||||
t->device = d;
|
t->device = d;
|
||||||
|
|
@ -1940,7 +1944,7 @@ static void interface_added(struct spa_bt_monitor *monitor,
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
a = adapter_create(monitor, object_path);
|
a = adapter_create(monitor, object_path);
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
spa_log_warn(monitor->log, "can't create adapter");
|
spa_log_warn(monitor->log, "can't create adapter: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1960,7 +1964,7 @@ static void interface_added(struct spa_bt_monitor *monitor,
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
d = device_create(monitor, object_path);
|
d = device_create(monitor, object_path);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
spa_log_warn(monitor->log, "can't create device");
|
spa_log_warn(monitor->log, "can't create device: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -469,7 +469,7 @@ static void idle_func(struct spa_source *source)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((r = pw_rtkit_make_realtime(system_bus, 0, rtprio)) < 0) {
|
if ((r = pw_rtkit_make_realtime(system_bus, 0, rtprio)) < 0) {
|
||||||
pw_log_debug("could not make thread realtime: %s", strerror(r));
|
pw_log_debug("could not make thread realtime: %s", spa_strerror(r));
|
||||||
} else {
|
} else {
|
||||||
pw_log_debug("thread made realtime");
|
pw_log_debug("thread made realtime");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue