From 2582c70d4e3fa8531a3e35415409d3ef59a94822 Mon Sep 17 00:00:00 2001 From: MyeongSeong Seo Date: Sat, 6 Apr 2013 18:30:46 +0900 Subject: [PATCH] Fix a prevent issue Change-Id: I8b20b219fe8a5a7240cbedc08f4659f90f810de6 Signed-off-by: MyeongSeong Seo --- src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp | 2 ++ src/http/FNetHttp_HttpSessionImpl.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp b/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp index dad737f..6cf17ec 100644 --- a/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp +++ b/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp @@ -343,6 +343,8 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) for (int i = 0; i < countOfCookie; i++) { String* pCookieLine = dynamic_cast< String* >(cookieList.GetAt(i)); + SysTryReturnResult(NID_NET_HTTP, pCookieLine != null, E_SYSTEM, + "A system error has occurred."); SysLog(NID_NET_HTTP, "[%d] The cookie line is %ls.", i, pCookieLine->GetPointer()); r = pCookieFile->Write(*pCookieLine); diff --git a/src/http/FNetHttp_HttpSessionImpl.cpp b/src/http/FNetHttp_HttpSessionImpl.cpp index f80eec6..0622d15 100644 --- a/src/http/FNetHttp_HttpSessionImpl.cpp +++ b/src/http/FNetHttp_HttpSessionImpl.cpp @@ -648,7 +648,11 @@ _HttpSessionImpl::Construct(const NetConnection& netConnection, NetHttpSessionMo // Set the device name (setsockopt) pConnectionInfo = netConnection.GetNetConnectionInfo(); + SysTryReturnResult(NID_NET_HTTP, pConnectionInfo != null, + E_INVALID_CONNECTION, "Failed to get NetConnectionInfo."); pConnectionInfoImpl = _NetConnectionInfoImpl::GetInstance(*pConnectionInfo); + SysTryReturnResult(NID_NET_HTTP, pConnectionInfoImpl != null, + E_INVALID_CONNECTION, "Failed to get NetConnectionInfo."); __deviceName = pConnectionInfoImpl->GetDeviceName(); if (__deviceName.IsEmpty()) -- 2.7.4