Add missing feature checking code 77/278477/5
authorInHong Han <inhong1.han@samsung.com>
Thu, 21 Jul 2022 04:53:26 +0000 (13:53 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 25 Jul 2022 06:20:10 +0000 (15:20 +0900)
Change-Id: Ifdf752b16b955eeb8ab3d090c68ebdd70e33be80

client/ma.c
include/multi_assistant.h

index 8647fd91a70d61bc668c863d70c99fdc7f6a1987..f2b197e5028ba7cd81f208e48ba1d087bb409b59 100644 (file)
@@ -2181,6 +2181,10 @@ int ma_remove_wake_word(const char* wake_word, const char *language) {
 
 int ma_get_wakeup_info_wake_word(char** wake_word)
 {
+       int ret = MA_ERROR_NONE;
+       ret = __ma_validate_client(false, false, NULL);
+       if (MA_ERROR_NONE != ret) return ret;
+
        if (wake_word) {
                *wake_word = strdup(g_wakeup_info.wake_word);
        }
@@ -2189,6 +2193,10 @@ int ma_get_wakeup_info_wake_word(char** wake_word)
 
 int ma_get_wakeup_info_extra_data(unsigned char** extra_data, int* extra_data_length, char **extra_data_desc)
 {
+       int ret = MA_ERROR_NONE;
+       ret = __ma_validate_client(false, false, NULL);
+       if (MA_ERROR_NONE != ret) return ret;
+
        if (extra_data) {
                *extra_data = (unsigned char*)malloc(g_wakeup_info.extra_data_length);
                if (*extra_data)
index f5a2e1e39f2d6dfe88da0c0a395d2dc63fb2ef00..891779c4ea8ef01903a971c7c307cba869f0cc7e 100644 (file)
@@ -845,7 +845,7 @@ int ma_remove_wake_word(const char* wake_word, const char *language);
  * @since_tizen 7.0
  *
  * @remarks You must release @a wake_word using free().
- *          @a wake_word can be changed whenever @c ma_active_state_changed_cb is called.
+ *          @a wake_word can be changed whenever ma_active_state_changed_cb() is called.
  * @param[out] wake_word The wake word information, if exists.
  *
  * @return @c 0 on success, otherwise a negative error value
@@ -868,7 +868,7 @@ int ma_get_wakeup_info_wake_word(char** wake_word);
  * @since_tizen 7.0
  *
  * @remarks You must release @a extra_data and @a extra_data_desc using free().
- *          @a extra_data can be changed whenever @c ma_active_state_changed_cb is called.
+ *          @a extra_data can be changed whenever ma_active_state_changed_cb() is called.
  * @param[out] extra_data The extra data information, if exists.
  * @param[out] extra_data_length The length of extra data.
  * @param[out] extra_data_desc The string value describing the type of extra data.