Skip to content
Browse files

Added sel_has_exists and sel_has_recent on mailimap_selection_info to…

… indicate if we had an EXISTS or RECENT response
  • Loading branch information...
1 parent 7c0d9ed commit 858408bafcd9f83efb19400f1868a48a17b8825f patrick84 committed Mar 19, 2012
Showing with 11 additions and 4 deletions.
  1. +7 −4 src/low-level/imap/mailimap.c
  2. +2 −0 src/low-level/imap/mailimap_types.c
  3. +2 −0 src/low-level/imap/mailimap_types.h
View
11 src/low-level/imap/mailimap.c
@@ -346,14 +346,17 @@ static void mailbox_data_store(mailimap * session,
break;
case MAILIMAP_MAILBOX_DATA_EXISTS:
- if (session->imap_selection_info)
+ if (session->imap_selection_info) {
session->imap_selection_info->sel_exists = mb_data->mbd_data.mbd_exists;
+ session->imap_selection_info->sel_has_exists = 1;
+ }
break;
case MAILIMAP_MAILBOX_DATA_RECENT:
- if (session->imap_selection_info)
- session->imap_selection_info->sel_recent =
- mb_data->mbd_data.mbd_recent;
+ if (session->imap_selection_info) {
+ session->imap_selection_info->sel_recent = mb_data->mbd_data.mbd_recent;
+ session->imap_selection_info->sel_has_recent = 1;
+ }
break;
case MAILIMAP_MAILBOX_DATA_EXTENSION_DATA:
if (session->imap_response_info) {
View
2 src/low-level/imap/mailimap_types.c
@@ -2886,6 +2886,8 @@ mailimap_selection_info_new(void)
sel_info->sel_exists = 0;
sel_info->sel_recent = 0;
sel_info->sel_unseen = 0;
+ sel_info->sel_has_exists = 0;
+ sel_info->sel_has_recent = 0 ;
return sel_info;
}
View
2 src/low-level/imap/mailimap_types.h
@@ -3227,6 +3227,8 @@ struct mailimap_selection_info {
uint32_t sel_exists;
uint32_t sel_recent;
uint32_t sel_unseen;
+ uint8_t sel_has_exists:1;
+ uint8_t sel_has_recent:1;
};
struct mailimap_selection_info *

0 comments on commit 858408b

Please sign in to comment.
Something went wrong with that request. Please try again.