projects
/
framework
/
connectivity
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix the case when the requested name is already in use
[framework/connectivity/connman.git]
/
gdbus
/
mainloop.c
diff --git
a/gdbus/mainloop.c
b/gdbus/mainloop.c
index
7f2d001
..
ec10ab0
100644
(file)
--- a/
gdbus/mainloop.c
+++ b/
gdbus/mainloop.c
@@
-347,8
+347,12
@@
gboolean g_dbus_request_name(DBusConnection *connection, const char *name,
return FALSE;
}
- if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
+ if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+ if (error != NULL)
+ dbus_set_error(error, name, "Name already in use");
+
return FALSE;
+ }
return TRUE;
}