Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dbus: do not emit signals when the main thread finished early
  • Loading branch information
perexg committed Aug 11, 2014
1 parent d3f8ad7 commit 57a0382
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dbus.c
Expand Up @@ -351,11 +351,14 @@ dbus_server_thread(void *aux)
uint8_t c;

conn = dbus_create_session("org.tvheadend.server");
if (conn == NULL)
if (conn == NULL) {
dbus_running = 0;
return NULL;
}

notify = dbus_create_session("org.tvheadend.notify");
if (notify == NULL) {
dbus_running = 0;
dbus_connection_safe_close(conn);
return NULL;
}
Expand All @@ -368,6 +371,7 @@ dbus_server_thread(void *aux)
tvhpoll_add(poll, &ev, 1);
memset(&ev, 0, sizeof(ev));
if (!dbus_connection_get_unix_fd(conn, &ev.fd)) {
dbus_running = 0;
tvhpoll_destroy(poll);
dbus_connection_safe_close(notify);
dbus_connection_safe_close(conn);
Expand Down

0 comments on commit 57a0382

Please sign in to comment.