From: Adhavan M Date: Fri, 4 May 2018 10:36:17 +0000 (+0000) Subject: Revert "Use endpoints provided by socket activation" X-Git-Tag: submit/tizen/20180504.104640~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c68bcb8110ee5bbf1be97144589c27c5590e9e2;p=sdk%2Ftarget%2Fsdbd.git Revert "Use endpoints provided by socket activation" This reverts commit 6d7244165d3c13ca69d199934ed8ffa01b8c87a0. Change-Id: I880b2a5f7e547b9239fc2c9cb00b241d51b98c3f --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 080dbcc..4416ce1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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( diff --git a/packaging/sdbd.spec b/packaging/sdbd.spec index 8cd9879..8bba6c1 100644 --- a/packaging/sdbd.spec +++ b/packaging/sdbd.spec @@ -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) diff --git a/src/usb_funcfs_client.c b/src/usb_funcfs_client.c index 94f56f4..3e1ef6b 100644 --- a/src/usb_funcfs_client.c +++ b/src/usb_funcfs_client.c @@ -24,7 +24,6 @@ #include #include #include -#include #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;