From 1e606b03bc8592c827a9d7895ae76096173ce3e8 Mon Sep 17 00:00:00 2001 From: Jin Yoon Date: Wed, 19 Jul 2017 13:56:19 +0900 Subject: [PATCH] Device name is set only by a internal function Change-Id: I2a28a5461a4a53bd0e64bebad1dfc13dbf8a3748 --- inc/connectivity_internal.h | 2 +- src/connectivity.c | 5 ++--- src/controller.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inc/connectivity_internal.h b/inc/connectivity_internal.h index 1f1ff14..ff4abe7 100644 --- a/inc/connectivity_internal.h +++ b/inc/connectivity_internal.h @@ -22,7 +22,7 @@ #ifndef __POSITION_FINDER_CONNECTIVITY_INTERNAL_H__ #define __POSITION_FINDER_CONNECTIVITY_INTERNAL_H__ -extern int connectivity_init(const char *device_name); +extern int connectivity_init(void); extern int connectivity_fini(void); #endif /* __POSITION_FINDER_CONNECTIVITY_INTERNAL_H__ */ diff --git a/src/connectivity.c b/src/connectivity.c index 7522fb7..50f651f 100644 --- a/src/connectivity.c +++ b/src/connectivity.c @@ -370,15 +370,14 @@ error: _send_response(request, NULL, IOTCON_RESPONSE_ERROR); } -/* device_name : "iotcon-test-basic-server" */ -int connectivity_init(const char *device_name) +int connectivity_init(void) { int ret = -1; ret = iotcon_initialize("/home/owner/apps_rw/org.tizen.position-finder-server/data/iotcon-test-svr-db-server.dat"); retv_if(IOTCON_ERROR_NONE != ret, -1); - ret = iotcon_set_device_name(device_name); + ret = iotcon_set_device_name(ULTRASONIC_RESOURCE_TYPE); goto_if(IOTCON_ERROR_NONE != ret, error); ret = iotcon_start_presence(10); diff --git a/src/controller.c b/src/controller.c index f27dc55..2b2754c 100644 --- a/src/controller.c +++ b/src/controller.c @@ -209,7 +209,7 @@ int main(int argc, char* argv[]) /* Do not modify codes under this comment */ static void _start_internal_function(void) { - connectivity_init("iotcon-test-basic-server"); + connectivity_init(); } static void _stop_internal_function(void) -- 2.7.4