Improve performance
authorJaekyun Lee <jkyun.lee@samsung.com>
Tue, 25 Jun 2013 13:57:16 +0000 (22:57 +0900)
committerJaekyun Lee <jkyun.lee@samsung.com>
Tue, 25 Jun 2013 13:58:39 +0000 (22:58 +0900)
use getpgid() instead of capi-appfw-app-manager

Change-Id: Iaaf6653550fa6103a8b0c6e3f84f497602444fa4

packaging/nfc-manager.spec
src/commonlib/CMakeLists.txt
src/commonlib/include/net_nfc_util_private.h
src/commonlib/net_nfc_util.c
src/manager/net_nfc_server_context.c

index 4a3d9da..ddd211b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       nfc-manager
 Summary:    NFC framework manager
-Version:    0.0.45
+Version:    0.0.46
 Release:    0
 Group:      libs
 License:    Flora Software License
@@ -30,7 +30,6 @@ BuildRequires: pkgconfig(pmapi)
 BuildRequires: pkgconfig(pkgmgr)
 BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(ecore-x)
-BuildRequires: pkgconfig(capi-appfw-app-manager)
 BuildRequires: cmake
 BuildRequires: gettext-tools
 Requires(post):   /sbin/ldconfig
index 302cde8..65e4b30 100644 (file)
@@ -14,7 +14,7 @@ IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(commonlib_pkges REQUIRED glib-2.0 dlog bluetooth-api libssl capi-appfw-app-manager)
+pkg_check_modules(commonlib_pkges REQUIRED glib-2.0 dlog bluetooth-api libssl)
 
 FOREACH(flag ${commonlib_pkges_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 8b53450..6967411 100644 (file)
@@ -82,6 +82,5 @@ bool net_nfc_util_strip_string(char *buffer, int buffer_length);
 void net_nfc_util_compute_CRC(CRC_type_e CRC_type, uint8_t *buffer, uint32_t length);
 
 const char *net_nfc_util_get_schema_string(int index);
-pid_t net_nfc_util_get_current_app_pgid(pid_t pid);
 
 #endif
index 3caa006..86c0ccd 100644 (file)
@@ -23,7 +23,6 @@
 // platform header
 #include <bluetooth-api.h>
 #include <vconf.h>
-#include <app_manager.h>
 
 // nfc-manager header
 #include "net_nfc_util_private.h"
@@ -505,21 +504,3 @@ const char *net_nfc_util_get_schema_string(int index)
        else
                return schema[index];
 }
-
-pid_t net_nfc_util_get_current_app_pgid(pid_t pid)
-{
-       char *app_id = NULL;
-       app_context_h context = NULL;
-       pid_t pgid = NULL;
-
-       app_manager_get_app_id(pid, &app_id);
-       app_manager_get_app_context(app_id, &context);
-
-       app_context_get_pid(context, &pgid);
-
-       free(app_id);
-       app_context_destroy(context);
-
-       return pgid;
-}
-
index 2bbe240..03be916 100644 (file)
@@ -136,7 +136,7 @@ void net_nfc_server_add_client_context(pid_t pid, int socket, GIOChannel *channe
                if (info != NULL)
                {
                        info->pid = pid;
-                       info->pgid = net_nfc_util_get_current_app_pgid(pid);
+                       info->pgid = getpgid(pid);
                        info->socket = socket;
                        info->channel = channel;
                        info->src_id = src_id;