Changeset d0961fe


Ignore:
Timestamp:
Jun 7, 2007, 1:16:58 AM (17 years ago)
Author:
Alex Vandiver <alexmv@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f032974
Parents:
9c590d4
git-author:
Alex Vandiver <alexmv@mit.edu> (06/07/07 01:16:55)
git-committer:
Alex Vandiver <alexmv@mit.edu> (06/07/07 01:16:58)
Message:
Incoming CC'd zephyrs logged to all people they were sent to
File:
1 edited

Legend:

Unmodified
Added
Removed
  • logging.c

    r9c590d4 rd0961fe  
    307307    snprintf(filename, MAXPATHLEN, "%s/%s", logpath, from);
    308308    snprintf(allfilename, MAXPATHLEN, "%s/all", logpath);
     309    owl_log_append(m, allfilename);
    309310
    310311  } else {
     
    312313    snprintf(filename, MAXPATHLEN, "%s/%s", logpath, from);
    313314  }
     315
     316  owl_log_append(m, filename);
     317
     318  if (personal && owl_message_is_type_zephyr(m)) {
     319    // We want to log to all of the CC'd people who were not us, or
     320    // the sender, as well.
     321    char *cc, *temp;
     322    cc = owl_message_get_cc_without_recipient(m);
     323    if (cc != NULL) {
     324      temp = strtok(cc, " ");
     325      while (temp != NULL) {
     326        temp = short_zuser(temp);
     327        if (strcasecmp(temp, frombuff) != 0) {
     328          snprintf(filename, MAXPATHLEN, "%s/%s", logpath, temp);
     329          owl_log_append(m, filename);
     330        }
     331        temp = strtok(NULL, " ");
     332      }
     333      owl_free(cc);
     334    }
     335  }
     336
     337  owl_free(frombuff);
    314338  owl_free(logpath);
    315   owl_free(frombuff);
    316 
    317   owl_log_append(m, filename);
    318 
    319   if (personal)
    320       owl_log_append(m, allfilename);
    321 
    322 }
     339}
Note: See TracChangeset for help on using the changeset viewer.