push is not working for the outlook.com 87/94987/1 accepted/tizen/3.0/common/20161114.081238 accepted/tizen/3.0/ivi/20161102.075303 accepted/tizen/3.0/mobile/20161102.075227 accepted/tizen/3.0/wearable/20161102.075244 submit/tizen_3.0/20161102.044545 submit/tizen_3.0_common/20161110.084657
authorsireesha.t <sireesha.t@samsung.com>
Wed, 12 Oct 2016 06:31:50 +0000 (12:01 +0530)
committerintae jeon <intae.jeon@samsung.com>
Wed, 2 Nov 2016 05:26:16 +0000 (22:26 -0700)
[Problem]“Push” is not working for the “outlook.com “ .
[Cause & Measure] Cause: In gmail EXISTS response is coming first then RECENT response.In outlook RECENT response coming first then EXISTS.
In code once we read first response, we are not reading second response but sync procedure kept under EXISTS response. So for outlook server we are not doing sync operation .
Measure: Modified code to read both EXISTS and RECENT responses.

Change-Id: I2de6a9ecd013e06110d8c17f2cd86bd7ca012088
Signed-off-by: intae, jeon <intae.jeon@samsung.com>
(cherry picked from commit cc93fcf5b51ec4d992d3f832bd41a3cabb5139fe)

email-core/email-core-imap-idle.c

index 3d97cb3..63d2a09 100755 (executable)
@@ -252,10 +252,14 @@ static int emcore_parse_imap_idle_response(char *multi_user_name,
                                if (strstr(p, "EXIST") != NULL) {
                                        if (!emcore_imap_idle_insert_sync_event(multi_user_name, input_account_id, input_mailbox_id, &err))
                                                EM_DEBUG_EXCEPTION_SEC("Syncing mailbox[%d] failed with err_code [%d]", input_mailbox_id, err);
-                               } else
+                                       EM_SAFE_FREE(p);
+                                       break;
+                               }
+                               else {
                                        EM_DEBUG_LOG("Skipped this message");
-                               EM_SAFE_FREE(p);
-                               break;
+                                       EM_SAFE_FREE(p);
+                               }
+
                        }
                } else if (p && (!strncmp(p, "+", 1))) {
                        /* Bad response from server */