- Timestamp:
- May 7, 2010, 9:40:35 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 4727d31
- Parents:
- a41c8d1
- git-author:
- Nelson Elhage <nelhage@mit.edu> (05/07/10 20:31:20)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/07/10 21:40:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
message.c
r9a7b4f2 r839697d 584 584 585 585 /* caller must free return value */ 586 char*owl_message_get_cc_without_recipient(const owl_message *m)587 { 588 char *cc, * out, *end, *shortuser, *recip;586 GList *owl_message_get_cc_without_recipient(const owl_message *m) 587 { 588 char *cc, *shortuser, *recip; 589 589 const char *user; 590 GList *out = NULL; 590 591 591 592 cc = owl_message_get_cc(m); … … 594 595 595 596 recip = short_zuser(owl_message_get_recipient(m)); 596 out = owl_malloc(strlen(cc) + 2);597 end = out;598 597 599 598 user = strtok(cc, " "); … … 601 600 shortuser = short_zuser(user); 602 601 if (strcasecmp(shortuser, recip) != 0) { 603 strcpy(end, user); 604 end[strlen(user)] = ' '; 605 end += strlen(user) + 1; 602 out = g_list_prepend(out, owl_strdup(user)); 606 603 } 607 604 owl_free(shortuser); 608 605 user = strtok(NULL, " "); 609 606 } 610 end[0] = '\0';611 607 612 608 owl_free(recip); 613 609 owl_free(cc); 614 615 if (strlen(out) == 0) {616 owl_free(out);617 out = NULL;618 }619 610 620 611 return(out);
Note: See TracChangeset
for help on using the changeset viewer.