Changeset bff1f22


Ignore:
Timestamp:
Jan 23, 2012, 6:41:16 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.9
Children:
d6b2ae8
Parents:
bf70350
git-author:
Anders Kaseorg <andersk@mit.edu> (10/23/11 00:23:00)
git-committer:
Anders Kaseorg <andersk@mit.edu> (01/23/12 18:41:16)
Message:
Add function to test whether a recipient is personal

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: David Benjamin <davidben@mit.edu>
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r6646fdb rbff1f22  
    836836
    837837 
    838   /* set the "isprivate" attribute if it's a private zephyr.
    839    ``private'' means recipient is non-empty and doesn't start wit
    840    `@' */
    841   if (*n->z_recipient && *n->z_recipient != '@') {
     838  /* set the "isprivate" attribute if it's a private zephyr. */
     839  if (owl_zwrite_recip_is_personal(n->z_recipient)) {
    842840    owl_message_set_isprivate(m);
    843841  }
  • zephyr.c

    rbf70350 rbff1f22  
    789789  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
    790790    if (retnotice->z_recipient == NULL
    791         || *retnotice->z_recipient == 0
    792         || *retnotice->z_recipient == '@') {
     791        || !owl_zwrite_recip_is_personal(retnotice->z_recipient)) {
    793792      char *buff;
    794793      owl_function_error("No one subscribed to class %s", retnotice->z_class);
  • zwrite.c

    ref4074b rbff1f22  
    338338}
    339339
     340bool owl_zwrite_recip_is_personal(const char *recipient)
     341{
     342  return recipient[0] && recipient[0] != '@';
     343}
     344
    340345int owl_zwrite_is_personal(const owl_zwrite *z)
    341346{
Note: See TracChangeset for help on using the changeset viewer.