Fix VPN read issue 76/67476/1
authortaesubkim <taesub.kim@samsung.com>
Wed, 27 Apr 2016 00:45:36 +0000 (09:45 +0900)
committertaesubkim <taesub.kim@samsung.com>
Wed, 27 Apr 2016 00:45:45 +0000 (09:45 +0900)
[Model] COMMON
[Issue#] VPN read not returning for long time
[Request] N/A
[Occurrence Version] N/A
[Problem] timeval structure is not initialized properly
[Cause & Measure] Garbage value passed to select() function
[Checking Method] Try to use vpnsvc_read() API
[Team] Wireless Data
[Developer] Ravi Prasad RK
[Solution company] Samsung
[Change Type] N/A

Change-Id: I670c37d79584a5cb1c483a342cb5b71c3e2fa137
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
framework/src/capi_vpn_service.c
packaging/capi-vpn-service.spec

index c4ea33d..0d88fb9 100755 (executable)
@@ -605,6 +605,7 @@ EXPORT_API int vpnsvc_read(vpnsvc_h handle, int timeout_ms)
        /* listen for events */
        FD_ZERO(&read_set);
        FD_SET(tun_s->fd, &read_set);
+       tv.tv_sec = 0;
        tv.tv_usec = timeout_ms*1000;
        retVal = select(tun_s->fd +1, &read_set, NULL, NULL, &tv);
 
index ce85600..a80298c 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       vpnsvc-pkg
 Summary:    VPN service library in TIZEN C API
-Version:    1.0.11
+Version:    1.0.12
 Release:    1
 Group:      System/Network
 License:    Apache-2.0