summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-27 13:34:47 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-27 13:34:47 +0000
commit22e31062ad9458a148a4e4203fb3aed43e65dfa4 (patch)
tree727f619e42ca09668b1cbdebb7abf2a7c45e2d61
parent8a4b3eedbb21fc9a88b3a3d2be42b2369b969f02 (diff)
serial: don't send ProxyCreated signal when the daemon starts
-rw-r--r--serial/manager.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/serial/manager.c b/serial/manager.c
index 637a9603..7a489c7f 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -1648,7 +1648,6 @@ done:
static int register_proxy_object(struct proxy *prx, char *outpath, size_t size)
{
char path[MAX_PATH_LENGTH + 1];
- const char *ppath = path;
snprintf(path, MAX_PATH_LENGTH, "/org/bluez/serial/proxy%d",
sk_counter++);
@@ -1661,12 +1660,6 @@ static int register_proxy_object(struct proxy *prx, char *outpath, size_t size)
dbus_connection_register_interface(connection, path,
SERIAL_PROXY_INTERFACE, proxy_methods, NULL, NULL);
-
- dbus_connection_emit_signal(connection, SERIAL_MANAGER_PATH,
- SERIAL_MANAGER_INTERFACE, "ProxyCreated",
- DBUS_TYPE_STRING, &ppath,
- DBUS_TYPE_INVALID);
-
proxies_paths = g_slist_append(proxies_paths, g_strdup(path));
if (outpath)
@@ -1829,6 +1822,11 @@ static DBusHandlerResult create_proxy(DBusConnection *conn,
return err_failed(conn, msg, "Create object path failed");
}
+ dbus_connection_emit_signal(connection, SERIAL_MANAGER_PATH,
+ SERIAL_MANAGER_INTERFACE, "ProxyCreated",
+ DBUS_TYPE_STRING, &ppath,
+ DBUS_TYPE_INVALID);
+
dbus_message_append_args(reply,
DBUS_TYPE_STRING, &ppath,
DBUS_TYPE_INVALID);