[P151125-03506] NAVER server's server search is not operated 97/90397/6
authorSan Cho <san.cho@samsung.com>
Thu, 18 Feb 2016 05:32:55 +0000 (14:32 +0900)
committerintae, jeon <intae.jeon@samsung.com>
Mon, 10 Oct 2016 03:23:47 +0000 (12:23 +0900)
[model] Z3
[binary_type] AP
[customer] N/A
[issue#] P151125-03506
[problem] NAVER server's server search is not operated
[cause] search command's sequence was not accepted by naver.com (HEADER subject)
[solution] change the position of "HEADER subject" forward
[team] Email
[request] N/A
[horizontal_expansion] N/A

Change-Id: I411b6a520e103505b3a036af396d1130d636c7ad
Signed-off-by: intae, jeon <intae.jeon@samsung.com>
email-common-use/include/email-debug-log.h
email-core/email-core-mail.c
email-core/email-storage/email-storage.c

index ef9141c..141da92 100755 (executable)
@@ -58,7 +58,7 @@ extern "C"
 
 #define LOG_TAG "EMAIL_SERVICE"
 
-#define        EM_DEBUG_LOG(format, arg...)        SLOGD(format, ##arg)
+#define        EM_DEBUG_LOG(format, arg...)        SLOGW(format, ##arg)
 #define        EM_DEBUG_EXCEPTION(format, arg...)  SLOGE("[EXCEPTION!] " format "\n", ##arg)
 
 #define        EM_DEBUG_LOG_SEC(format, arg...)        SECURE_SLOGD(format, ##arg)
index 0e922ca..075595b 100755 (executable)
@@ -3940,7 +3940,26 @@ INTERNAL_FUNC int emcore_delete_mails_from_local_storage(char *multi_user_name,
                                EM_DEBUG_EXCEPTION("emstorage_remove_downloaded_mail failed [%d]", err);
                                goto FINISH_OFF;
                        }
-               }
+
+               /* Deleting search result mail's information */
+               } else if (result_mail_list[i].mailbox_type == EMAIL_MAILBOX_TYPE_SEARCH_RESULT) {
+                       /* searched mail uids */
+                       if (!emstorage_remove_downloaded_mail(multi_user_name,
+                                                                                                       account_id,
+                                                                                                       result_mail_list[i].mailbox_id,
+                                                                                                       EMAIL_SEARCH_RESULT_MAILBOX_NAME,
+                                                                                                       result_mail_list[i].server_mail_id,
+                                                                                                       false,
+                                                                                                       &err)) {
+                               EM_DEBUG_EXCEPTION("emstorage_remove_downloaded_mail failed [%d]", err);
+                               goto FINISH_OFF;
+                       }
+                       /* searched mail's partial body activity */
+                       if (!emcore_delete_pbd_activity(multi_user_name, account_id, result_mail_list[i].mail_id, 0, &err)) {
+                               EM_DEBUG_EXCEPTION("emcore_delete_pbd_activity failed [%d]", err);
+                               goto FINISH_OFF;
+                       }
+        }
        }
 
 #ifdef __FEATURE_WIFI_AUTO_DOWNLOAD__
index 5e3ca31..654d92f 100755 (executable)
@@ -13437,7 +13437,7 @@ INTERNAL_FUNC int emstorage_get_pbd_mailbox_list(char *multi_user_name, int acco
 {
        EM_DEBUG_FUNC_BEGIN("account_id[%d], mailbox_list[%p], count[%p] err_code[%p]", account_id, mailbox_list, count, err_code);
 
-       if (account_id < FIRST_ACCOUNT_ID || NULL == mailbox_list || *mailbox_list == NULL || NULL == count) {
+       if (account_id < FIRST_ACCOUNT_ID || NULL == mailbox_list || NULL == count) {
                EM_DEBUG_EXCEPTION("account_id[%d], mailbox_list[%p], count[%p] err_code[%p]", account_id, mailbox_list, count, err_code);
                if (err_code != NULL)
                        *err_code = EMAIL_ERROR_INVALID_PARAM;
@@ -17840,6 +17840,8 @@ gint glist_compare_column_name(gconstpointer old_column_info, gconstpointer new_
        if (old_column_info == NULL || new_column_info == NULL)
                return -1;
 
+
+       EM_DEBUG_FUNC_END("error [%d]", error);
        return EM_SAFE_STRCMP((char*)left_one->column_name, (char*)right_one->column_name);
 }