Apply coding rule 11/74411/1 accepted/tizen/common/20160616.151800 accepted/tizen/ivi/20160617.081456 accepted/tizen/mobile/20160617.081142 accepted/tizen/tv/20160617.081233 accepted/tizen/wearable/20160617.081307 submit/tizen/20160615.100519 submit/tizen/20160616.005920
authorhyunuktak <hyunuk.tak@samsung.com>
Tue, 14 Jun 2016 07:09:30 +0000 (16:09 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Tue, 14 Jun 2016 07:09:32 +0000 (16:09 +0900)
Change-Id: I27052e643043340996f7d7f09a0d37e95f2eedea
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
daemon/src/vpn_service_daemon.c
daemon/src/vpnsvc.c
test/vpn_service_test.c

index 33dbbf7..db079df 100755 (executable)
@@ -964,9 +964,8 @@ int vpn_daemon_up(int iface_index, const char* local_ip, const char* remote_ip,
                }
        }
 
-       if (nr_dns > 0) {
+       if (nr_dns > 0)
                dns_nat_register(dns_servers, nr_dns, local_ip);
-       }
 #endif
 
        return ret;
index b5d2e9e..afde6f6 100755 (executable)
@@ -240,7 +240,7 @@ gboolean handle_vpn_up(Vpnsvc *object,
 done:
        /* free pointers */
        for (i = 0; i < arg_nr_routes; i++) {
-               if(routes[i])
+               if (routes[i])
                        g_free(routes[i]);
        }
 
index e1b4dbb..b293817 100755 (executable)
@@ -28,8 +28,6 @@
 #endif
 #define LOG_TAG "VPNSVC_TEST"
 
-#define TEST_VPN_IF_NAME "vpnsvc_test"
-
 #define TEST_CONSOLE_PRINT(FMT, ARG...) fprintf(stderr, FMT, ##ARG); \
        fprintf(stderr, "\n")
 #define TEST_CONSOLE_INPUT(BUFFER, LENGTH) \
@@ -68,9 +66,12 @@ static const char *test_print_error(vpnsvc_error_e error)
 
 int test_vpnsvc_init()
 {
-       char *name = TEST_VPN_IF_NAME;
        int rv = VPNSVC_ERROR_NONE;
        int int_value;
+       char name[33];
+
+       printf("Input VPN interface name to initialize : ");
+       rv = scanf("%32s", name);
 
        rv = vpnsvc_init(name, &handle);