Changes in / [e0fba58:82dd923]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    re8c6d8f r87dfeb7  
    129129   message2hashref and hashref2message. Currently we lose
    130130   zephyr-specific properties stored in the ZNotice_t
     131
     132   This has been somewhat addressed, but is still not lossless.
    131133 */
    132134owl_message * owl_perlconfig_hashref2message(SV *msg)
     
    173175      owl_message_set_attribute(m, "adminheader", "");
    174176  }
     177#ifdef HAVE_LIBZEPHYR
     178  if (owl_message_is_type_zephyr(m)) {
     179    ZNotice_t *n = &(m->notice);
     180    n->z_kind = ACKED;
     181    n->z_port = 0;
     182    n->z_auth = ZAUTH_NO;
     183    n->z_checked_auth = 0;
     184    n->z_class = owl_message_get_class(m);
     185    n->z_class_inst = owl_message_get_instance(m);
     186    n->z_opcode = owl_message_get_opcode(m);
     187    n->z_sender = owl_message_get_sender(m);
     188    n->z_recipient = owl_message_get_recipient(m);
     189    n->z_default_format = "[zephyr created from perl]";
     190    n->z_multinotice = "[zephyr created from perl]";
     191    n->z_num_other_fields = 0;
     192    n->z_message = owl_sprintf("%s%c%s", owl_message_get_zsig(m), '\0', owl_message_get_body(m));
     193    n->z_message_len = strlen(owl_message_get_zsig(m)) + strlen(owl_message_get_body(m)) + 1;
     194  }
     195#endif
    175196  return m;
    176197}
Note: See TracChangeset for help on using the changeset viewer.