plugin.c
void *dbus_thread(sd_bus *bus) {
    for (;;) {
        int r;
        /* Process requests */
        r = sd_bus_process(bus, NULL);
        if (r < 0) {
            mumble_log("Failed to process bus: %s", strerror(-r));
            return NULL;
        }
        if (r > 0) /* we processed a request, try to process another one,
                      right-away */
            continue;

        // TODO: swap out for proper event loop
        /* Wait for the next request to process */
        r = sd_bus_wait(bus, (uint64_t)-1);
        if (r < 0) {
            mumble_log("Failed to wait on bus: %s\n", strerror(-r));
            return NULL;
        }
    }
}
/*
** This thread handles monitoring the dbus connection and calling into
*Mumble
** It also checks for the termination signal sent from Mumble when the
*plugin is
** unloaded.
*/
This thread handles monitoring the dbus connection and calling into
Mumble
It also checks for the termination signal sent from Mumble when the
plugin is
unloaded.
This thread handles monitoring the dbus connection and calling into Mumble It also checks for the termination signal sent from Mumble when the plugin is unloaded .
void *dbus_thread(sd_bus *bus) {
    for (;;) {
        int r;
        r = sd_bus_process(bus, NULL);
        if (r < 0) {
            mumble_log("Failed to process bus: %s", strerror(-r));
            return NULL;
        }
        if (r > 0) 
            continue;
        r = sd_bus_wait(bus, (uint64_t)-1);
        if (r < 0) {
            mumble_log("Failed to wait on bus: %s\n", strerror(-r));
            return NULL;
        }
    }
}
void * dbus_thread ( sd_bus * bus ) { for ( ; ; ) { int r ; r = sd_bus_process ( bus , NULL ) ; if ( r < 0 ) { mumble_log ( " " , strerror ( - r ) ) ; return NULL ; } if ( r > 0 ) continue ; r = sd_bus_wait ( bus , ( uint64_t ) -1 ) ; if ( r < 0 ) { mumble_log ( " \n " , strerror ( - r ) ) ; return NULL ; } } }
This thread handles monitoring the dbus connection and calling into
Mumble
It also checks for the termination signal sent from Mumble when the
plugin is
unloaded.
This thread handles monitoring the dbus connection and calling into Mumble It also checks for the termination signal sent from Mumble when the plugin is unloaded .
/* Process requests */ /* we processed a request, try to process another one,
                      right-away */ // TODO: swap out for proper event loop /* Wait for the next request to process */