From 6c62e00caad2ddba503356008319bb22898832ca Mon Sep 17 00:00:00 2001 From: "kj7.sung" Date: Mon, 27 Nov 2017 10:35:35 +0900 Subject: [PATCH] Remove mod_get_realpath - remove realpath - adding module free for passive Change-Id: Ia6bf16a824f5ee822876eca579a2bac181d30b4f Signed-off-by: kj7.sung --- location/manager/location-passive.c | 3 +++ location/module/module-internal.c | 20 -------------------- location/module/module-internal.h | 1 - packaging/liblbs-location.spec | 2 +- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/location/manager/location-passive.c b/location/manager/location-passive.c index accae68..e666e3e 100644 --- a/location/manager/location-passive.c +++ b/location/manager/location-passive.c @@ -253,6 +253,9 @@ location_passive_finalize(GObject *gobject) LocationPassivePrivate *priv = GET_PRIVATE(gobject); g_return_if_fail(priv); + module_free(priv->mod, "passive"); + priv->mod = NULL; + if (priv->boundary_list) { g_list_free_full(priv->boundary_list, free_boundary_list); priv->boundary_list = NULL; diff --git a/location/module/module-internal.c b/location/module/module-internal.c index 8027cb5..3aea4a9 100755 --- a/location/module/module-internal.c +++ b/location/module/module-internal.c @@ -323,23 +323,3 @@ gboolean module_is_supported(const char *module_name) return found; } - -gchar *mod_get_realpath(const gchar *module_name) -{ - gchar origin_path[PATH_MAX] = { 0, }; - gchar link_path[PATH_MAX] = { 0, }; - gchar *path = NULL; - - snprintf(link_path, PATH_MAX, "%s/lib%s.so", MODULE_PATH_PREFIX, module_name); - - if (realpath(link_path, origin_path) == NULL || strlen(origin_path) == 0) { - LOCATION_LOGE("Fail to get real path of [%s]", module_name); - return NULL; - } - - path = strrchr(origin_path, '/'); - if (!path) - return NULL; - - return g_strdup(path); -} diff --git a/location/module/module-internal.h b/location/module/module-internal.h index 9c1a022..b761201 100644 --- a/location/module/module-internal.h +++ b/location/module/module-internal.h @@ -71,7 +71,6 @@ gboolean module_init(void); gpointer module_new(const char *module_name); void module_free(gpointer mod, const char *module_name); gboolean module_is_supported(const char *module_name); -gchar *mod_get_realpath(const gchar *module_name); G_END_DECLS diff --git a/packaging/liblbs-location.spec b/packaging/liblbs-location.spec index e0b4120..1f94b7e 100755 --- a/packaging/liblbs-location.spec +++ b/packaging/liblbs-location.spec @@ -1,6 +1,6 @@ Name: liblbs-location Summary: Location Based Service Library -Version: 1.4.5 +Version: 1.4.6 Release: 1 Group: Location/Libraries License: Apache-2.0 -- 2.7.4