Changeset 3965ec3d


Ignore:
Timestamp:
Mar 11, 2012, 11:44:39 PM (9 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
release-1.8
Children:
18250fa
Parents:
91882d6
git-author:
Anders Kaseorg <andersk@mit.edu> (10/23/11 00:23:00)
git-committer:
David Benjamin <davidben@mit.edu> (03/11/12 23:44:39)
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

    r34132f7 r3965ec3d  
    832832
    833833 
    834   /* set the "isprivate" attribute if it's a private zephyr.
    835    ``private'' means recipient is non-empty and doesn't start wit
    836    `@' */
    837   if (*n->z_recipient && *n->z_recipient != '@') {
     834  /* set the "isprivate" attribute if it's a private zephyr. */
     835  if (owl_zwrite_recip_is_personal(n->z_recipient)) {
    838836    owl_message_set_isprivate(m);
    839837  }
  • zephyr.c

    r91882d6 r3965ec3d  
    802802  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
    803803    if (retnotice->z_recipient == NULL
    804         || *retnotice->z_recipient == 0
    805         || *retnotice->z_recipient == '@') {
     804        || !owl_zwrite_recip_is_personal(retnotice->z_recipient)) {
    806805      char *buff;
    807806      owl_function_error("No one subscribed to class %s", retnotice->z_class);
  • zwrite.c

    r3cdd6d2 r3965ec3d  
    327327}
    328328
     329bool owl_zwrite_recip_is_personal(const char *recipient)
     330{
     331  return recipient[0] && recipient[0] != '@';
     332}
     333
    329334int owl_zwrite_is_personal(const owl_zwrite *z)
    330335{
Note: See TracChangeset for help on using the changeset viewer.