Revert "Use endpoints provided by socket activation" 29/177929/2
authorAdhavan M <adhavan.m@samsung.com>
Fri, 4 May 2018 10:36:17 +0000 (10:36 +0000)
committerManish Rathod <manish.r@samsung.com>
Fri, 4 May 2018 10:36:26 +0000 (10:36 +0000)
This reverts commit 6d7244165d3c13ca69d199934ed8ffa01b8c87a0.

Change-Id: I880b2a5f7e547b9239fc2c9cb00b241d51b98c3f

CMakeLists.txt
packaging/sdbd.spec
src/usb_funcfs_client.c

index 080dbcc..4416ce1 100644 (file)
@@ -99,19 +99,11 @@ IF(WEARABLE_PROFILE STREQUAL on)
         ADD_DEFINITIONS("-D_WEARABLE")
 ENDIF()
 
-# Get systemd
-pkg_check_modules(SYSTEMD REQUIRED libsystemd)
-foreach(flag ${SYSTEMD_CFLAGS})
-       set(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-endforeach(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-
 find_package(Threads REQUIRED)
 
 ADD_EXECUTABLE(sdbd ${SDBD_SRCS})
 ADD_EXECUTABLE(sdbd-user ${SDBD_SUBS})
-TARGET_LINK_LIBRARIES(sdbd -pie -lsmack -lresolv -ldl ${CMAKE_THREAD_LIBS_INIT} ${pkgs_LDFLAGS} ${SYSTEMD_LDFLAGS})
+TARGET_LINK_LIBRARIES(sdbd -pie -lsmack -lresolv -ldl ${CMAKE_THREAD_LIBS_INIT} ${pkgs_LDFLAGS})
 TARGET_LINK_LIBRARIES(sdbd-user -pie ${CMAKE_THREAD_LIBS_INIT} ${pkgs_LDFLAGS})
 
 set_property(
index 8cd9879..8bba6c1 100644 (file)
@@ -17,8 +17,6 @@ Source1006:    sdbd_emulator_tv.service
 
 BuildRequires: capi-system-info-devel >= 0.2.0
 BuildRequires: cmake >= 2.8.3
-BuildRequires: pkgconfig
-BuildRequires: pkgconfig(libsystemd)
 BuildRequires:  pkgconfig(libtzplatform-config)
 #BuildRequires: sec-product-features
 BuildRequires: pkgconfig(libsmack)
index 94f56f4..3e1ef6b 100644 (file)
@@ -24,7 +24,6 @@
 #include <sys/poll.h>
 #include <dirent.h>
 #include <errno.h>
-#include <systemd/sd-daemon.h>
 
 #include "sysdeps.h"
 
@@ -139,18 +138,7 @@ static void *usb_open_thread(void *x)
 {
     struct usb_handle *usb = (struct usb_handle *)x;
 
-    /* Endpoints are received from sytemd */
-    if (sd_listen_fds(0) >= 3) {
-        sdb_mutex_lock(&usb->control_lock);
-        usb->control = SD_LISTEN_FDS_START + 0;
-        usb->bulk_out = SD_LISTEN_FDS_START + 1;
-        usb->bulk_in = SD_LISTEN_FDS_START + 2;
-        sdb_cond_signal(&usb->control_notify);
-        sdb_mutex_unlock(&usb->control_lock);
-    } else {
-        init_functionfs(usb);
-    }
-
+    init_functionfs(usb);
     if (usb->control < 0 || usb->bulk_in < 0 || usb->bulk_out < 0) {
         D("[ opening device failed ]\n");
         return (void *)-1;
@@ -406,7 +394,7 @@ void ffs_usb_init()
         perror("[ failed to allocate memory for usb FunctionFS bulk device ]\n");
         return;
     }
-    if (sd_listen_fds(0) < 3 && autoconfig(h) < 0) {
+    if (autoconfig(h) < 0) {
         perror("[ can't recognize usb FunctionFS bulk device ]\n");
         free(h);
         return;