Clean up remained Dbus-1 related codes 78/130278/3
authorKunhoon Baik <knhoon.baik@samsung.com>
Sat, 20 May 2017 04:52:11 +0000 (13:52 +0900)
committerKwon <k_c.kwon@samsung.com>
Mon, 22 May 2017 02:12:35 +0000 (02:12 +0000)
Clean up codes, makefile and specfile to remove dbus-1 dependency

Change-Id: Idd75e3395fff79697010b49ac418d41967a898c7

CMakeLists.txt
packaging/resourced.spec
src/CMakeLists.txt
src/common/dbus-handler.c
src/common/dbus-handler.h
src/common/util.h
src/proc-stat/proc-monitor.c

index d16ecaad157e8c8524bfaea0ad553d7a718ba12d..e7710484f942796d2cf544ac80e0e2344f837ab5 100644 (file)
@@ -33,7 +33,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 #following section is needed for pkg-config *.in file
 SET(INCLUDEDIR ${PREFIX}/include)
 SET(PC_NAME lib${RESOURCED})
-SET(PC_REQUIRED "glib-2.0 vconf vconf-internal-keys sqlite3 dlog dbus-1")
+SET(PC_REQUIRED "glib-2.0 vconf vconf-internal-keys sqlite3 dlog")
 
 SET(PC_CFLAGS -I\${includedir}/system)
 SET(VERSION ${FULLVER})
index b0b644eb749eb74b8c06fc7a38a4acddd889a4a1..38161e951a611f12be3724c902693dc62abe18ff 100644 (file)
@@ -41,7 +41,6 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(vconf-internal-keys)
-BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(libsystemd)
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(leveldb)
index 2fa654e0329e54edceee189c6597afd91d3cbcf8..aa2aa261364af315ca3e10b13be2a9bf0c9fd04d 100644 (file)
@@ -125,7 +125,6 @@ SET(REQUIRES_LIST ${REQUIRES_LIST}
        sqlite3
        vconf
        vconf-internal-keys
-       dbus-1
        libsystemd
        leveldb
        eventsystem
index 13453894d80e4553d052dc1de2c41ef63866fc12..9260567938ad93d8d12a29659d65bc72d4a59b64 100644 (file)
@@ -24,7 +24,6 @@
  *
  */
 
-#include <dbus/dbus.h>
 #include <glib.h>
 #include <gio/gio.h>
 #include <stdint.h>
index ecb943634c6375995a4aa1183c3be5e3638202c7..1320721a5a739b1fe592a1988fd726cae07b9bbc 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef __DBUS_HANDLER_H__
 #define __DBUS_HANDLER_H__
 
-#include <dbus/dbus.h>
 #include <gio/gio.h>
 #include <resourced.h>
 
index 28ba1238996916bd95574ea32e95d72b42766cd2..aa8977fe497aff8fb01e4f7614ca85054894b848 100644 (file)
@@ -31,7 +31,6 @@
 #include <unistd.h>
 #include <string.h>
 #include <dirent.h>
-#include <dbus/dbus.h>
 
 #define COMMENT                '#'
 #define COMMENTS       "#;"
@@ -70,25 +69,11 @@ static inline void closedirp(DIR **d)
                closedir(*d);
 }
 
-static inline void __dbus_error_free(DBusError *error)
-{
-       if (error && dbus_error_is_set(error))
-               dbus_error_free(error);
-}
-
-static inline void __dbus_message_unref(DBusMessage **message)
-{
-       if (*message)
-               dbus_message_unref(*message);
-}
-
 #define _cleanup_free_ _cleanup_(freep)
 #define _cleanup_close_ _cleanup_(closep)
 #define _cleanup_fclose_ _cleanup_(fclosep)
 #define _cleanup_pclose_ _cleanup_(pclosep)
 #define _cleanup_closedir_ _cleanup_(closedirp)
-#define _cleanup_dbus_error_free_ _cleanup_(__dbus_error_free)
-#define _cleanup_dbus_message_unref_ _cleanup_(__dbus_message_unref)
 
 #define NUM_DIFF(x, y) ((x > y) ? (x - y) : (y -x))
 
index 4f455c835300280e8d6a56561c8b0cf16111a1cf..83d80b1a619b5905a2f0bcabcda4b9fc476a9745 100755 (executable)
@@ -147,7 +147,6 @@ static void dbus_pre_poweroff(GDBusMethodInvocation *invocation, GVariant *param
 
 static void proc_dbus_active_signal_handler(GVariant *params)
 {
-       _cleanup_dbus_error_free_ DBusError err = DBUS_ERROR_INIT;
        int type;
        char *str = NULL;
        pid_t pid = 0;