summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleerang song <leerang.song@samsung.com>2013-10-21 20:14:27 +0900
committerSoo-Hyun Choi <sh9.choi@samsung.com>2013-10-23 15:29:35 +0900
commit2d3f4669ea2c10afbff1045dde66a5b73f0f27af (patch)
treec8e8ab3da83dfc2226fb8220996cb0283ae4daba
parentf90e9c2eb63a8341cf55bd9dbb8d48bd31e8ccd1 (diff)
downloadweb-provider-2d3f4669ea2c10afbff1045dde66a5b73f0f27af.tar.gz
web-provider-2d3f4669ea2c10afbff1045dde66a5b73f0f27af.tar.bz2
web-provider-2d3f4669ea2c10afbff1045dde66a5b73f0f27af.zip
Check the return value of livebox_service_lb_script_path
[Issue#] P131017-03896 [Problem] web-provider crash occured. [Cause] livebox_service_lb_script_path returns char*. Sometimes livebox_service_lb_script_path returns NULL. But the variable of url that receives return is std::string. [Solution] The variable of url changes std::sting to char* and checks whether Null, or not. If path is NULL, URL is returned as the default parameter. Change-Id: Ie7a30694a438700355742b79db6c346e8adbcd30
-rwxr-xr-xsrc/Plugin/AppBoxPlugin/AppBoxRenderView.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp
index ad396da..72113d6 100755
--- a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp
+++ b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp
@@ -337,22 +337,31 @@ std::string AppBoxRenderView::getAppId(std::string& boxId)
std::string AppBoxRenderView::getStartUrl(UrlType type, std::string& defaultParams)
{
- std::string url;
+ const char* path;
switch (type) {
case URL_TYPE_BOX:
- url = livebox_service_lb_script_path(m_boxId.c_str());
+ path = livebox_service_lb_script_path(m_boxId.c_str());
break;
case URL_TYPE_PD:
- url = livebox_service_pd_script_path(m_boxId.c_str());
+ path = livebox_service_pd_script_path(m_boxId.c_str());
break;
default:
LogD("no available type");
}
+ std::string startUrl;
+ if (path) {
+ LogD("path : %s", path);
+ startUrl = path;
+ } else {
+ // TODO In this case, fallback page will be loaded.
+ LogE("Fail to get service lib script path");
+ }
+
// add default parameters to start url
- url += defaultParams;
+ startUrl += defaultParams;
- return url;
+ return startUrl;
}
Evas_Object* AppBoxRenderView::getCurrentSnapShot()