diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-03-30 14:38:32 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-03-30 14:38:32 +0000 |
commit | e9e95fcbedbb256e0dbcb4f9f79cd5e7db1465fc (patch) | |
tree | 7e4fb7b13bfe7747b182f2f76590b1a8379f99e2 /network/manager.c | |
parent | ada09c331c02c73acf9e208871a7fc04589a77fa (diff) |
Return an error when server already exist.
Diffstat (limited to 'network/manager.c')
-rw-r--r-- | network/manager.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/network/manager.c b/network/manager.c index 1accb8a2..33cbd36f 100644 --- a/network/manager.c +++ b/network/manager.c @@ -425,11 +425,9 @@ static DBusHandlerResult create_server(DBusConnection *conn, path = g_new0(char, 32); snprintf(path, 32, NETWORK_PATH "/server/%X", id); - /* Path already registered */ if (g_slist_find_custom(mgr->servers, path, (GCompareFunc) strcmp)) - return create_path(conn, msg, path, NULL); /* Return already exist error */ + return err_already_exists(conn, msg, "Server Already exists"); - /* FIXME: define which type should be used -- string/uuid str/uui128 */ if (server_register(conn, path, id) == -1) { err_failed(conn, msg, "D-Bus path registration failed"); g_free(path); |