[969] in BarnOwl Developers
[D-O-H] r956 - trunk/owl
daemon@ATHENA.MIT.EDU (geofft@MIT.EDU)
Thu Oct 29 18:11:41 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
Date: Tue, 19 Feb 2008 05:09:30 -0500
To: dirty-owl-hackers@mit.edu
From: geofft@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Author: geofft
Date: 2008-02-19 04:55:35 -0500 (Tue, 19 Feb 2008)
New Revision: 956
Modified:
trunk/owl/message.c
Log:
Fix a bug where an explicit (local) realm foiled
owl_message_get_cc_without_recipient(). (per quentin)
Modified: trunk/owl/message.c
===================================================================
--- trunk/owl/message.c 2008-02-19 06:23:14 UTC (rev 955)
+++ trunk/owl/message.c 2008-02-19 09:55:35 UTC (rev 956)
@@ -669,7 +669,7 @@
/* caller must free return value */
char *owl_message_get_cc_without_recipient(owl_message *m)
{
- char *cc, *out, *end, *user, *recip;
+ char *cc, *out, *end, *user, *shortuser, *recip;
cc = owl_message_get_cc(m);
if (cc == NULL)
@@ -681,11 +681,13 @@
user = strtok(cc, " ");
while (user != NULL) {
- if (strcasecmp(user, recip) != 0) {
+ shortuser = short_zuser(user);
+ if (strcasecmp(shortuser, recip) != 0) {
strcpy(end, user);
end[strlen(user)] = ' ';
end += strlen(user) + 1;
}
+ free(shortuser);
user = strtok(NULL, " ");
}
end[0] = '\0';