Insert to noti->b_text the translate text 15/73815/1 accepted/tizen/common/20160613.144704 accepted/tizen/ivi/20160610.114455 accepted/tizen/mobile/20160610.114401 accepted/tizen/tv/20160610.114423 accepted/tizen/wearable/20160610.114441 submit/tizen/20160610.015635
authorMyungki Lee <mk5004.lee@samsung.com>
Thu, 9 Jun 2016 12:22:47 +0000 (21:22 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Thu, 9 Jun 2016 12:22:47 +0000 (21:22 +0900)
- when noti->b_text is null, bundle create and insert data.
  But this bundle addr is different from noti->b_text.

Change-Id: Idf41cf97ab7b78cc81f1df79065448f7191bfd3d
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification_internal.c

index ed0aab9..2d6b69f 100755 (executable)
@@ -366,9 +366,13 @@ EXPORT_API int notification_translate_localized_text(notification_h noti)
        for (; type < NOTIFICATION_TEXT_TYPE_MAX; type++) {
                noti_err = notification_get_text(noti, type, &ret_text);
                if (noti_err == NOTIFICATION_ERROR_NONE && ret_text) {
+                       if (noti->b_text == NULL) {
+                               noti->b_text = bundle_create();
+                               if (noti->b_text == NULL)
+                                       return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+                       }
+
                        b = noti->b_text;
-                       if (b == NULL)
-                               b = bundle_create();
 
                        new_text = strdup(ret_text);