Assign current client info regardless of wake word existence 65/312065/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 3 Jun 2024 12:37:59 +0000 (21:37 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 3 Jun 2024 12:37:59 +0000 (21:37 +0900)
Change-Id: Ie0d5b44df52e9e28f674bcec3da96ddc741158e7

src/service_main.cpp

index 1aa80f0755d622e016c611c6cdc8d56489212521..e667dc81c2311cc84f2916c08bb205acf6587ed7 100644 (file)
@@ -615,13 +615,15 @@ int CServiceMain::add_assistant_info(ma_assistant_info_s* info) {
                if (items.size() < MAX_MACLIENT_INFO_NUM) {
                        index = items.size();
                        items.push_back(ClientInfoItems());
+               } else {
+                       MAS_LOGE("ClientInfoItems size exceeded %d", MAX_MACLIENT_INFO_NUM);
                }
        }
        if (-1 != index) {
                items[index].used = true;
                items[index].preprocessing_allow_mode = MA_PREPROCESSING_ALLOW_NONE;
                items[index].preprocessing_allow_appid = boost::none;
-               MAS_LOGD("app_id(%s)", info->app_id);
+               MAS_LOGD("[%d] app_id(%s)", index, info->app_id);
                items[index].appid = info->app_id;
 
                if (is_current_preprocessing_assistant(items[index].appid)) {
@@ -1055,9 +1057,8 @@ int CServiceMain::set_current_client_by_appid(const char *appid)
 
        std::vector<ClientInfoItems> &items = mClientInfo.getItems();
        for (int loop = 0; loop < std::min(MAX_MACLIENT_INFO_NUM, items.size()); loop++) {
-               if (items[loop].used &&
-                       0 < items[loop].appid.length() &&
-                       0 < items[loop].wakeup_word[0].size()) {
+               LOGD("Comparing appid : [%d] %s %s", loop, appid, items[loop].appid.c_str());
+               if (items[loop].used && 0 < items[loop].appid.length()) {
                        if (0 == items[loop].appid.compare(appid)) {
                                MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, appid);
                                mCurrentClientInfo = loop;