ID_FROM,
ID_DEST,
ID_SUBJECT,
- ID_FROMDEST,
+ ID_PARTICIPANT,
MAX_ID
};
"from",
"dest",
"subj",
- "fromdest"
+ "part"
};
struct parsable_field {
int mbox_line_match_search(int search_id, regex_t *search_regexp,
int mbox_id, char *mbox_value) {
- return search_id == mbox_id && regexec(search_regexp, mbox_value, 0, 0, 0) == 0;
+ return
+ (search_id == mbox_id ||
+ (search_id == ID_PARTICIPANT && (mbox_id == ID_FROM || mbox_id == ID_DEST)))
+ &&
+ regexec(search_regexp, mbox_value, 0, 0, 0) == 0;
}
void search_in_db(int nb_search_patterns,