static bool service_app_create(void *data)
{
LOGI("");
- return g_service_main.app_create(data);
+ bool ret = false;
+ try {
+ ret = g_service_main.app_create(data);
+ } catch (std::exception &e) {
+ LOGE("Exception : %s", e.what());
+ }
+ return ret;
}
static void service_app_terminate(void *data)
{
LOGI("");
- return g_service_main.app_terminate(data);
+ try {
+ g_service_main.app_terminate(data);
+ } catch (std::exception &e) {
+ LOGE("Exception : %s", e.what());
+ }
}
static void service_app_control(app_control_h app_control, void *data)
} else if (cur->name && 0 == xmlStrcmp(cur->name, (const xmlChar*)MA_TAG_ASSISTANT_NAME)) {
key = xmlNodeGetContent(cur);
if (key) {
+ if (temp.name) {
+ free((void*)(temp.name));
+ temp.name = NULL;
+ }
temp.name = strdup((const char*)key);
MAS_LOGI("Name : %s", key);
xmlFree(key);
} else if (cur->name && 0 == xmlStrcmp(cur->name, (const xmlChar*)MA_TAG_ASSISTANT_APPID)) {
key = xmlNodeGetContent(cur);
if (key) {
+ if (temp.app_id) {
+ free((void*)(temp.app_id));
+ temp.app_id = NULL;
+ }
temp.app_id = strdup((const char*)key);
MAS_LOGI("ID : %s", key);
xmlFree(key);
key = xmlNodeGetContent(cur);
if (key) {
if (temp.icon_path) {
- free((void*)temp.icon_path);
+ free((void*)(temp.icon_path));
temp.icon_path = NULL;
}
temp.icon_path = strdup((const char*)key);
if (mStreamingThread.joinable()) {
MWR_LOGD("mStreamingThread is joinable, trying join()");
mStopStreamingThread.store(true);
- mStreamingThread.join();
+ try {
+ mStreamingThread.join();
+ } catch (std::exception &e) {
+ MWR_LOGE("Exception : %s", e.what());
+ }
}
mStopStreamingThread.store(false);
mStreamingHistory.last_count_fetched.load(),
mStreamingHistory.last_audio_sent.load());
mStopStreamingThread.store(true);
- mStreamingThread.join();
+ try {
+ mStreamingThread.join();
+ } catch (std::exception &e) {
+ MWR_LOGE("Exception : %s", e.what());
+ }
}
mStopStreamingThread.store(false);
}