summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 14:30:05 (GMT)
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 14:30:05 (GMT)
commit8cff34042d8ca5e5600e3e717b50df3b8c2cdb68 (patch)
tree08f59924859db138af7b4b53b474918f2a705ff5
parentd14b7db7ba635774061bdf0046be56571cbc36a5 (diff)
downloadconnman-8cff34042d8ca5e5600e3e717b50df3b8c2cdb68.zip
connman-8cff34042d8ca5e5600e3e717b50df3b8c2cdb68.tar.gz
connman-8cff34042d8ca5e5600e3e717b50df3b8c2cdb68.tar.bz2
[SPIN] gdbus: revert pending DBus call.refs/changes/61/74461/1
Change-Id: Ic8781d015af6e83ca9e90183f9b256ec9f5a0812 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rwxr-xr-xgdbus/client.c9
-rwxr-xr-xgdbus/gdbus.h6
-rwxr-xr-xgdbus/mainloop.c4
-rwxr-xr-xgdbus/object.c2
4 files changed, 20 insertions, 1 deletions
diff --git a/gdbus/client.c b/gdbus/client.c
index 48711ae..6e4dc66 100755
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -58,8 +58,10 @@ struct GDBusClient {
void *signal_data;
GDBusProxyFunction proxy_added;
GDBusProxyFunction proxy_removed;
+#if !defined TIZEN_EXT
GDBusClientFunction ready;
void *ready_data;
+#endif
GDBusPropertyFunction property_changed;
void *user_data;
GList *proxy_list;
@@ -729,6 +731,7 @@ gboolean g_dbus_proxy_set_property_basic(GDBusProxy *proxy,
return TRUE;
}
+#if !defined TIZEN_EXT
gboolean g_dbus_proxy_set_property_array(GDBusProxy *proxy,
const char *name, int type, const void *value,
size_t size, GDBusResultFunction function,
@@ -815,6 +818,7 @@ gboolean g_dbus_proxy_set_property_array(GDBusProxy *proxy,
return TRUE;
}
+#endif
struct method_call_data {
GDBusReturnFunction function;
@@ -1073,9 +1077,10 @@ static void parse_managed_objects(GDBusClient *client, DBusMessage *msg)
dbus_message_iter_next(&dict);
}
-
+#if !defined TIZEN_EXT
if (client->ready)
client->ready(client, client->ready_data);
+#endif
}
static void get_managed_objects_reply(DBusPendingCall *call, void *user_data)
@@ -1365,6 +1370,7 @@ gboolean g_dbus_client_set_signal_watch(GDBusClient *client,
return TRUE;
}
+#if !defined TIZEN_EXT
gboolean g_dbus_client_set_ready_watch(GDBusClient *client,
GDBusClientFunction ready, void *user_data)
{
@@ -1376,6 +1382,7 @@ gboolean g_dbus_client_set_ready_watch(GDBusClient *client,
return TRUE;
}
+#endif
gboolean g_dbus_client_set_proxy_handlers(GDBusClient *client,
GDBusProxyFunction proxy_added,
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index d99c254..633db0c 100755
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -330,10 +330,12 @@ gboolean g_dbus_proxy_set_property_basic(GDBusProxy *proxy,
GDBusResultFunction function, void *user_data,
GDBusDestroyFunction destroy);
+#if !defined TIZEN_EXT
gboolean g_dbus_proxy_set_property_array(GDBusProxy *proxy,
const char *name, int type, const void *value,
size_t size, GDBusResultFunction function,
void *user_data, GDBusDestroyFunction destroy);
+#endif
typedef void (* GDBusSetupFunction) (DBusMessageIter *iter, void *user_data);
typedef void (* GDBusReturnFunction) (DBusMessage *message, void *user_data);
@@ -343,7 +345,9 @@ gboolean g_dbus_proxy_method_call(GDBusProxy *proxy, const char *method,
GDBusReturnFunction function, void *user_data,
GDBusDestroyFunction destroy);
+#if !defined TIZEN_EXT
typedef void (* GDBusClientFunction) (GDBusClient *client, void *user_data);
+#endif
typedef void (* GDBusProxyFunction) (GDBusProxy *proxy, void *user_data);
typedef void (* GDBusPropertyFunction) (GDBusProxy *proxy, const char *name,
DBusMessageIter *iter, void *user_data);
@@ -370,8 +374,10 @@ gboolean g_dbus_client_set_disconnect_watch(GDBusClient *client,
GDBusWatchFunction function, void *user_data);
gboolean g_dbus_client_set_signal_watch(GDBusClient *client,
GDBusMessageFunction function, void *user_data);
+#if !defined TIZEN_EXT
gboolean g_dbus_client_set_ready_watch(GDBusClient *client,
GDBusClientFunction ready, void *user_data);
+#endif
gboolean g_dbus_client_set_proxy_handlers(GDBusClient *client,
GDBusProxyFunction proxy_added,
GDBusProxyFunction proxy_removed,
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index b90a844..edb384e 100755
--- a/gdbus/mainloop.c
+++ b/gdbus/mainloop.c
@@ -30,6 +30,8 @@
#include "gdbus.h"
+#define DISPATCH_TIMEOUT 0
+
#define info(fmt...)
#define error(fmt...)
#define debug(fmt...)
@@ -68,6 +70,8 @@ static gboolean message_dispatch(void *data)
{
DBusConnection *conn = data;
+ dbus_connection_ref(conn);
+
/* Dispatch messages */
while (dbus_connection_dispatch(conn) == DBUS_DISPATCH_DATA_REMAINS);
diff --git a/gdbus/object.c b/gdbus/object.c
index 96db516..c7ed02f 100755
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1247,8 +1247,10 @@ static struct generic_data *object_path_ref(DBusConnection *connection,
if (!dbus_connection_register_object_path(connection, path,
&generic_table, data)) {
+#if !defined TIZEN_EXT
dbus_connection_unref(data->conn);
g_free(data->path);
+#endif
g_free(data->introspect);
g_free(data);
return NULL;