summaryrefslogtreecommitdiff
path: root/client/dbus_helpers.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-25 16:49:16 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-03 17:08:31 +0300
commitfff12a67390147487a7d3b41e7c8aa60487243ed (patch)
tree52aa328c9f09b41f948ac468caa2b9eed864a5e2 /client/dbus_helpers.c
parent96eeaec35d249a615537e33981151b699a64d76f (diff)
downloadconnman-fff12a67390147487a7d3b41e7c8aa60487243ed.tar.gz
connman-fff12a67390147487a7d3b41e7c8aa60487243ed.tar.bz2
connman-fff12a67390147487a7d3b41e7c8aa60487243ed.zip
client: Enable method call return to exit or continue running
Enable a client method call return function to exit or continue running when in non-interactive mode. When a connmanctl_dbus_method_return_func_t returns -EINPROGRESS in non-interactive mode, the command line client is kept running even after the method call has been processed. The command line client needs to keep running after a successful Agent registration in order to process Agent method calls. Also enabling tethering in non-interactive mode needs the client executing until SSID, passphrase and tethering mode have been set.
Diffstat (limited to 'client/dbus_helpers.c')
-rw-r--r--client/dbus_helpers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/dbus_helpers.c b/client/dbus_helpers.c
index 9c0e1eb2..a3e08433 100644
--- a/client/dbus_helpers.c
+++ b/client/dbus_helpers.c
@@ -127,6 +127,7 @@ struct dbus_callback {
static void dbus_method_reply(DBusPendingCall *call, void *user_data)
{
struct dbus_callback *callback = user_data;
+ int res = 0;
DBusMessage *reply;
DBusMessageIter iter;
@@ -146,11 +147,11 @@ static void dbus_method_reply(DBusPendingCall *call, void *user_data)
}
dbus_message_iter_init(reply, &iter);
- callback->cb(&iter, NULL, callback->user_data);
+ res = callback->cb(&iter, NULL, callback->user_data);
end:
__connmanctl_redraw_rl();
- if (__connmanctl_is_interactive() == false)
+ if (__connmanctl_is_interactive() == false && res != -EINPROGRESS)
__connmanctl_quit();
g_free(callback);