Changeset 9c590d4 for message.c


Ignore:
Timestamp:
Jun 6, 2007, 11:31:49 PM (18 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:
d0961fe
Parents:
48609ce
git-author:
Alex Vandiver <alexmv@mit.edu> (06/06/07 23:31:44)
git-committer:
Alex Vandiver <alexmv@mit.edu> (06/06/07 23:31:49)
Message:
Outgoing CC'd messages get logged to all recipients
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r48609ce r9c590d4  
    663663char *owl_message_get_cc_without_recipient(owl_message *m)
    664664{
    665   char *cc, *out, *end, *user;
     665  char *cc, *out, *end, *user, *recip;
    666666
    667667  cc = owl_message_get_cc(m);
     668  if (cc == NULL)
     669    return NULL;
     670
     671  recip = short_zuser(owl_message_get_recipient(m));
    668672  out = owl_malloc(strlen(cc));
    669673  end = out;
     
    671675  user = strtok(cc, " ");
    672676  while (user != NULL) {
    673     if (strcasecmp(user, short_zuser(owl_message_get_recipient(m))) != 0) {
     677    if (strcasecmp(user, recip) != 0) {
    674678      strcpy(end, user);
    675679      end[strlen(user)] = ' ';
     
    680684  end[0] = '\0';
    681685
     686  owl_free(recip);
    682687  owl_free(cc);
     688
     689  if (strlen(out) == 0) {
     690    owl_free(out);
     691    out = NULL;
     692  }
     693
    683694  return(out);
    684695}
Note: See TracChangeset for help on using the changeset viewer.