Device name is set only by a internal function
authorJin Yoon <jinny.yoon@samsung.com>
Wed, 19 Jul 2017 04:56:19 +0000 (13:56 +0900)
committerGeunSun Lee <gs86.lee@samsung.com>
Wed, 19 Jul 2017 06:39:34 +0000 (06:39 +0000)
Change-Id: I2a28a5461a4a53bd0e64bebad1dfc13dbf8a3748

inc/connectivity_internal.h
src/connectivity.c
src/controller.c

index 1f1ff14..ff4abe7 100644 (file)
@@ -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__ */
index 7522fb7..50f651f 100644 (file)
@@ -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);
index f27dc55..2b2754c 100644 (file)
@@ -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)