[629] in BarnOwl Developers
[D-O-H] r730 - trunk/owl
daemon@ATHENA.MIT.EDU (chmrr@MIT.EDU)
Thu Oct 29 18:08:06 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: chmrr@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Date: Thu, 07 Jun 2007 01:16:59 -0400
Author: chmrr
Date: 2007-06-07 01:16:58 -0400 (Thu, 07 Jun 2007)
New Revision: 730
Modified:
trunk/owl/
trunk/owl/logging.c
Log:
r1614@utwig: chmrr | 2007-06-07 01:16:55 -0400
* Incoming CC'd zephyrs logged to all people they were sent to
Property changes on: trunk/owl
___________________________________________________________________
Name: svk:merge
- 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1612
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:17717
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
+ 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1614
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:17717
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
Modified: trunk/owl/logging.c
===================================================================
--- trunk/owl/logging.c 2007-06-07 03:31:49 UTC (rev 729)
+++ trunk/owl/logging.c 2007-06-07 05:16:58 UTC (rev 730)
@@ -306,17 +306,34 @@
logpath = owl_text_substitute(owl_global_get_logpath(&g), "~", owl_global_get_homedir(&g));
snprintf(filename, MAXPATHLEN, "%s/%s", logpath, from);
snprintf(allfilename, MAXPATHLEN, "%s/all", logpath);
+ owl_log_append(m, allfilename);
} else {
logpath = owl_text_substitute(owl_global_get_classlogpath(&g), "~", owl_global_get_homedir(&g));
snprintf(filename, MAXPATHLEN, "%s/%s", logpath, from);
}
- owl_free(logpath);
- owl_free(frombuff);
owl_log_append(m, filename);
- if (personal)
- owl_log_append(m, allfilename);
+ if (personal && owl_message_is_type_zephyr(m)) {
+ // We want to log to all of the CC'd people who were not us, or
+ // the sender, as well.
+ char *cc, *temp;
+ cc = owl_message_get_cc_without_recipient(m);
+ if (cc != NULL) {
+ temp = strtok(cc, " ");
+ while (temp != NULL) {
+ temp = short_zuser(temp);
+ if (strcasecmp(temp, frombuff) != 0) {
+ snprintf(filename, MAXPATHLEN, "%s/%s", logpath, temp);
+ owl_log_append(m, filename);
+ }
+ temp = strtok(NULL, " ");
+ }
+ owl_free(cc);
+ }
+ }
+ owl_free(frombuff);
+ owl_free(logpath);
}