Fix a prevent issue
authorMyeongSeong Seo <ms49.seo@samsung.com>
Sat, 6 Apr 2013 09:30:46 +0000 (18:30 +0900)
committerMyeongSeong Seo <ms49.seo@samsung.com>
Sat, 6 Apr 2013 09:30:46 +0000 (18:30 +0900)
Change-Id: I8b20b219fe8a5a7240cbedc08f4659f90f810de6
Signed-off-by: MyeongSeong Seo <ms49.seo@samsung.com>
src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp
src/http/FNetHttp_HttpSessionImpl.cpp

index dad737f..6cf17ec 100644 (file)
@@ -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);
index f80eec6..0622d15 100644 (file)
@@ -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())