DBusMessage *reply;
reply = dbus_message_new_method_return(msg);
-if(reply) dbus_message_append_args(reply, DBUS_TYPE_STRING, &(spi_global_app_data->app_bus_addr), DBUS_TYPE_INVALID);
+if (reply)
+ {
+ const char *retval = (g_getenv ("AT_SPI_CLIENT") ?
+ "":
+ spi_global_app_data->app_bus_addr);
+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &retval, DBUS_TYPE_INVALID);
+ }
return reply;
}
{
DBusPendingCall *pending;
SpiReentrantCallClosure closure;
+ GMainContext *main_context;
- closure.loop = g_main_loop_new (spi_global_app_data->main_context, FALSE);
- switch_main_context (spi_global_app_data->main_context);
+ main_context = (g_getenv ("AT_SPI_CLIENT") ? NULL :
+ spi_global_app_data->main_context);
+ closure.loop = g_main_loop_new (main_context, FALSE);
+ switch_main_context (main_context);
if (!dbus_connection_send_with_reply (bus, message, &pending, -1))
{