LOGI("==== Load Script ====");
FILE *f = NULL;
- char js_path[1024] = {'\0',};
- char buf[256] = {'\0',};
+ char js_path[1024] = {'\0'};
+ char buf[256] = {'\0'};
snprintf(js_path, 1024, "%s/%s", VC_WEBVIEW_JS_PATH, filename);
LOGD("===path (%s)", js_path);
}
fseek(f, 0, SEEK_SET);
- char *script = new char [fsize + 1];
+ char *script = new char[fsize + 1];
long int ret = fread(script, 1, fsize, f);
if (ret != fsize) {
LOGE("Couldn't read vc-webview.js file %d, %d", fsize, ret);
LOGI("%d ", vc_widget_set_send_current_command_list_cb(g_vc_w, __vc_widget_send_current_command_list_cb, (void*)m_list));
LOGI("%d ", vc_widget_set_current_language_changed_cb(g_vc_w, __vc_language_changed_cb, NULL));
#if 0
- LOGI("%d ",vc_widget_set_request_action_cb(g_vc_w, __vc_request_action_cb, NULL));
- LOGI("%d ",vc_widget_set_getdata_cb(g_vc_w, __vc_get_client_data_cb, NULL));
- LOGI("%d ",vc_widget_set_setdata_cb(g_vc_w, __vc_set_client_data_cb, NULL));
+ LOGI("%d ", vc_widget_set_request_action_cb(g_vc_w, __vc_request_action_cb, NULL));
+ LOGI("%d ", vc_widget_set_getdata_cb(g_vc_w, __vc_get_client_data_cb, NULL));
+ LOGI("%d ", vc_widget_set_setdata_cb(g_vc_w, __vc_set_client_data_cb, NULL));
#endif
LOGI("%d ", vc_widget_prepare(g_vc_w));
// Load language script
- char filename[64] = {'\0',};
+ char filename[64] = {'\0'};
char *current = NULL;
if (0 != vc_widget_get_current_language(g_vc_w, ¤t)) {
LOGW("[WARN] Fail to get current langauge");
if (NULL != m_lang_script)
delete [] m_lang_script;
- char filename[64] = {'\0',};
+ char filename[64] = {'\0'};
snprintf(filename, 64, "vc-webview-%s.js", current);
m_lang_script = vc_webview_load_script(filename);
if (NULL == m_lang_script) {
char* lang = NULL;
vc_widget_get_current_language(g_vc_w, &lang);
if (NULL != lang) {
- char filename[64] = {'\0',};
+ char filename[64] = {'\0'};
snprintf(filename, 64, "vc-webview-%s.js", lang);
if (NULL != m_lang_script)
delete [] m_lang_script;
FILE *f = NULL;
file_name = host_name + path_name + ".js";
- char js_path[1024] = {'\0',};
- char buf[256] = {'\0',};
+ char js_path[1024] = {'\0'};
+ char buf[256] = {'\0'};
snprintf(js_path, 1024, "%s/%s", VC_WEBVIEW_CUSTOM_PATH, file_name.c_str());
LOGD("=== path (%s)", js_path);
}
fseek(f, 0, SEEK_SET);
- char *script = new char [fsize + 1];
+ char *script = new char[fsize + 1];
long int ret = fread(script, 1, fsize, f);
if (ret != fsize) {
LOGE("Couldn't read vc-webview.js file %d, %d", fsize, ret);
int *conflict = (int*)data;
- *conflict = atoi(javascript_result);
+ if (NULL != javascript_result) {
+ *conflict = atoi(javascript_result);
+ } else {
+ LOGE("Invalid javascript action");
+ *conflict = -1;
+ }
g_wait = false;
}