summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchanywa <cbible.kim@samsung.com>2016-06-15 12:35:07 (GMT)
committerchanywa <cbible.kim@samsung.com>2016-06-16 00:02:39 (GMT)
commit8b0589afbdd8140bf3ecae73a9a0dd923845947a (patch)
tree9ee333c2451a94432734ccf99aca572615563fb2
parenta5ed7546fb5b108b19232aaad05cfad283bf2ac0 (diff)
downloadgeofence-dbus-8b0589afbdd8140bf3ecae73a9a0dd923845947a.zip
geofence-dbus-8b0589afbdd8140bf3ecae73a9a0dd923845947a.tar.gz
geofence-dbus-8b0589afbdd8140bf3ecae73a9a0dd923845947a.tar.bz2
Change-Id: I26e12e5f8fdeb7be3740329aebf344add1b01ff5
-rw-r--r--geofence/src/geofence_client.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/geofence/src/geofence_client.c b/geofence/src/geofence_client.c
index 7b3e7db..dea6dd1 100644
--- a/geofence/src/geofence_client.c
+++ b/geofence/src/geofence_client.c
@@ -100,6 +100,7 @@ EXPORT_API int geo_client_delete_geofence(geofence_client_dbus_h geofence_client
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
if (proxy) {
g_dbus_proxy_call(proxy, "DeleteGeofence", g_variant_new("(is)", fence_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
+ g_object_unref(proxy);
} else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);
@@ -172,6 +173,7 @@ EXPORT_API int geo_client_enable_geofence(geofence_client_dbus_h geofence_client
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
if (proxy) {
g_dbus_proxy_call(proxy, "EnableGeofence", g_variant_new("(isb)", geofence_id, app_id, onoff), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
+ g_object_unref(proxy);
} else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);
@@ -198,6 +200,7 @@ EXPORT_API int geo_client_start_geofence(geofence_client_dbus_h geofence_client,
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
if (proxy) {
g_dbus_proxy_call(proxy, "StartGeofence", g_variant_new("(is)", geofence_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
+ g_object_unref(proxy);
} else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);
@@ -223,6 +226,7 @@ EXPORT_API int geo_client_stop_geofence(geofence_client_dbus_h geofence_client,
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
if (proxy) {
g_dbus_proxy_call(proxy, "StopGeofence", g_variant_new("(is)", geofence_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
+ g_object_unref(proxy);
} else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);
@@ -290,6 +294,7 @@ EXPORT_API int geo_client_update_place(geofence_client_dbus_h geofence_client, g
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
if (proxy) {
g_dbus_proxy_call(proxy, "UpdatePlace", g_variant_new("(iss)", place_id, app_id, place_name), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
+ g_object_unref(proxy);
} else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);
@@ -312,8 +317,10 @@ EXPORT_API int geo_client_delete_place(geofence_client_dbus_h geofence_client, g
int ret = GEOFENCE_CLIENT_ERROR_NONE;
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
- if (proxy)
+ if (proxy) {
g_dbus_proxy_call(proxy, "DeletePlace", g_variant_new("(is)", place_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
+ g_object_unref(proxy);
+ }
else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);