summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungjae Cho <y0.cho@samsung.com>2022-05-03 09:38:40 +0900
committerYoungjae Cho <y0.cho@samsung.com>2022-05-03 09:39:16 +0900
commit7ed0bfea10cb5429eae4052612deb8f8078fe9c9 (patch)
tree407e6fbfb465ccc5863c0bab39bdba1825894711
parent119dee6d9a6c876ee00ebc70ff867b4c14a85053 (diff)
downloaddata-router-accepted/tizen_unified.tar.gz
data-router-accepted/tizen_unified.tar.bz2
data-router-accepted/tizen_unified.zip
Change-Id: I2b5328d2c51f3002820f7de8e40ed801eabb4852 Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
-rw-r--r--CMakeLists.txt1
-rwxr-xr-xpackaging/data-router.spec1
-rwxr-xr-xsrc/dr-noti-handler.c10
3 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a66e76..289aa9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED glib-2.0
gio-2.0
dlog vconf
+ capi-system-device
)
FOREACH(flag ${pkgs_CFLAGS})
diff --git a/packaging/data-router.spec b/packaging/data-router.spec
index a14cacf..9222901 100755
--- a/packaging/data-router.spec
+++ b/packaging/data-router.spec
@@ -11,6 +11,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.26
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(capi-system-device)
Requires(post): /usr/bin/vconftool
%description
diff --git a/src/dr-noti-handler.c b/src/dr-noti-handler.c
index a99e05d..b47f762 100755
--- a/src/dr-noti-handler.c
+++ b/src/dr-noti-handler.c
@@ -23,6 +23,7 @@
#include <glib.h>
#include <sys/wait.h>
+#include <device/usb-gadget.h>
#include "dr-main.h"
#include "dr-usb.h"
@@ -38,14 +39,7 @@ volatile gboolean dsr_status = FALSE;
static gboolean acm_enabled(int mode)
{
- switch (mode) {
- case SET_USB_DEFAULT:
- case SET_USB_SDB:
- case SET_USB_SDB_DIAG:
- return TRUE;
- default:
- return FALSE;
- }
+ return (mode & USB_GADGET_FUNC_ACM);
}
static void __usb_status_noti_handler(void *data)