From c96da93e7626ee67e22051ffdaf85ae4096c6362 Mon Sep 17 00:00:00 2001 From: taesubkim Date: Wed, 27 Apr 2016 09:45:36 +0900 Subject: [PATCH] Fix VPN read issue [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 --- framework/src/capi_vpn_service.c | 1 + packaging/capi-vpn-service.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/capi_vpn_service.c b/framework/src/capi_vpn_service.c index c4ea33d..0d88fb9 100755 --- a/framework/src/capi_vpn_service.c +++ b/framework/src/capi_vpn_service.c @@ -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); diff --git a/packaging/capi-vpn-service.spec b/packaging/capi-vpn-service.spec index ce85600..a80298c 100755 --- a/packaging/capi-vpn-service.spec +++ b/packaging/capi-vpn-service.spec @@ -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 -- 2.7.4