Changeset f7c0730 for zephyr.c


Ignore:
Timestamp:
Jan 23, 2012, 6:41:23 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.9
Children:
f183917
Parents:
9d206c6
git-author:
Anders Kaseorg <andersk@mit.edu> (10/22/11 21:28:36)
git-committer:
Anders Kaseorg <andersk@mit.edu> (01/23/12 18:41:23)
Message:
Append the realm to the zsender if missing

This works around the problem where setting zsender to your username
makes outgoing zephyrs become unauthenticated.  It will also make
things less confusing on cross-realm classes with the next commit.

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

Legend:

Unmodified
Added
Removed
  • zephyr.c

    rbff1f22 rf7c0730  
    697697  Code_t ret;
    698698  ZNotice_t notice;
     699  char *zsender = NULL;
    699700   
    700701  memset(&notice, 0, sizeof(notice));
     
    708709  notice.z_class=zstr(class);
    709710  notice.z_class_inst=zstr(instance);
    710   notice.z_sender=NULL;
    711711  if (!strcmp(recipient, "@")) {
    712712    notice.z_recipient=zstr("");
    713713    if (*owl_global_get_zsender(&g))
    714         notice.z_sender=zstr(owl_global_get_zsender(&g));
     714      notice.z_sender = zsender = long_zuser(owl_global_get_zsender(&g));
    715715  } else {
    716716    notice.z_recipient=zstr(recipient);
     
    730730  g_free(notice.z_message);
    731731  ZFreeNotice(&notice);
     732  g_free(zsender);
    732733  if (ret != ZERR_NONE) {
    733734    owl_function_error("Error sending zephyr: %s", error_message(ret));
Note: See TracChangeset for help on using the changeset viewer.