Fix Svace issues WGID 150343, 150344 00/101800/1 accepted/tizen/common/20161207.184141 accepted/tizen/ivi/20161207.030911 accepted/tizen/mobile/20161207.030824 accepted/tizen/tv/20161207.030841 accepted/tizen/wearable/20161207.030859 submit/tizen/20161206.143658
authorYu Jiung <jiung.yu@samsung.com>
Fri, 2 Dec 2016 07:09:21 +0000 (16:09 +0900)
committerYu Jiung <jiung.yu@samsung.com>
Fri, 2 Dec 2016 07:09:30 +0000 (16:09 +0900)
Change-Id: I3c9a04eddcfde6d583a15518a37d74288df187e4
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
packaging/capi-vpn-service.spec
src/capi_vpn_service.c

index 6b7afd4..addb2e8 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       vpnsvc-pkg
 Summary:    VPN service library in TIZEN C API
-Version:    1.0.25
+Version:    1.0.26
 Release:    1
 Group:      System/Network
 License:    Apache-2.0
index 8a61c49..e2c3d2f 100755 (executable)
@@ -650,7 +650,7 @@ EXPORT_API int vpnsvc_read(vpnsvc_h handle, int timeout_ms)
        tv.tv_usec = timeout_ms*1000;
        retVal = select(tun_s->fd +1, &read_set, NULL, NULL, &tv);
 
-       if (retVal) {
+       if (retVal > 0) {
                LOGD("Data is available now.\n");
                ret = VPNSVC_ERROR_NONE;
        } else if (retVal == 0) {
@@ -789,11 +789,7 @@ EXPORT_API int vpnsvc_unblock_networks(vpnsvc_h handle)
        tun_s = (vpnsvc_tun_s*)handle;
 
        LOGD("enter vpnsvc_unblock_networks");
-
-       if (tun_s == NULL) {
-               LOGE("handle is a NULL"); //LCOV_EXCL_LINE
-               return VPNSVC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
-       } else if (tun_s->connection == NULL) {
+       if (tun_s->connection == NULL) {
                LOGE("Connection Object is NULL"); //LCOV_EXCL_LINE
                return VPNSVC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }