appdata->iface.sock = 0;
#ifdef HAVE_LIBOSSO
osso_deinitialize(appdata->osso_context);
-#else
- dbus_deinitialize(appdata->osso_context);
-#endif
/* Instead of exiting, signaling finish to main loop could be better
retval->value.s = (gchar *) realloc(retval->value.s,34*sizeof(gchar *));
snprintf(retval->value.s,34,"Interface moved to original state");
*/
exit(0);
+#else
+ return OSSO_OK;
+#endif
}
if ( strcmp(method,"scan")==0 ) {
}
#ifndef HAVE_LIBOSSO
+
+dbus_bool_t stopped_service = FALSE;
+
static DBusObjectPathVTable *vtable = NULL;
int dbus_set_cb_f( DBusConnection *context,
dbus_message_get_member(message),
NULL, data, retval);
+ if ( strcmp(dbus_message_get_member(message),"stop")==0 )
+ stopped_service = TRUE;
+
if ( retval->value.s != NULL ) {
DBusMessage *reply = dbus_message_new_method_return (message);
if (reply == NULL)
event_loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(event_loop);
#else
- while (dbus_connection_read_write_dispatch (osso_context, -1)) {}
+ while (dbus_connection_read_write_dispatch(osso_context, -1) && stopped_service==FALSE) {}
#endif
/* Deinitialize OSSO */