Changeset b9517cf
- Timestamp:
- Jul 25, 2011, 1:35:30 AM (14 years ago)
- Branches:
- master, release-1.10, release-1.9
- Children:
- a74a044
- Parents:
- f271129
- git-author:
- David Benjamin <davidben@mit.edu> (07/25/11 01:24:06)
- git-committer:
- David Benjamin <davidben@mit.edu> (07/25/11 01:35:30)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rf271129 rb9517cf 1423 1423 owl_fmtext_appendf_normal(&fm, " Opcode : %s\n", owl_message_get_opcode(m)); 1424 1424 #ifdef HAVE_LIBZEPHYR 1425 if (owl_message_is_direction_in(m)) { 1425 n = owl_message_get_notice(m); 1426 if (n != NULL) { 1426 1427 char *tmpbuff, *tmpbuff2; 1427 1428 int i, fields; 1428 1429 n=owl_message_get_notice(m);1430 1429 1431 1430 if (!owl_message_is_pseudo(m)) { -
message.c
rf271129 rb9517cf 33 33 owl_message_set_direction_none(m); 34 34 m->delete=0; 35 36 #ifdef HAVE_LIBZEPHYR 37 m->has_notice = false; 38 #endif 35 39 36 40 owl_message_set_hostname(m, ""); … … 490 494 const ZNotice_t *owl_message_get_notice(const owl_message *m) 491 495 { 492 return (&(m->notice));496 return m->has_notice ? &m->notice : NULL; 493 497 } 494 498 #else … … 781 785 /* first save the full notice */ 782 786 m->notice = *n; 787 m->has_notice = true; 783 788 784 789 /* a little gross, we'll replace \r's with ' ' for now */ … … 996 1001 owl_pair *p; 997 1002 #ifdef HAVE_LIBZEPHYR 998 if ( owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) {1003 if (m->has_notice) { 999 1004 ZFreeNotice(&(m->notice)); 1000 1005 } -
owl.h
rf271129 rb9517cf 356 356 int direction; 357 357 #ifdef HAVE_LIBZEPHYR 358 bool has_notice; 358 359 ZNotice_t notice; 359 360 #endif -
perlconfig.c
rf271129 rb9517cf 91 91 owl_new_sv(owl_message_get_##field(m)), 0) 92 92 93 if (owl_message_is_type_zephyr(m) 94 && owl_message_is_direction_in(m)) { 93 if (owl_message_get_notice(m)) { 95 94 /* Handle zephyr-specific fields... */ 96 95 AV *av_zfields; … … 173 172 message2hashref and hashref2message. Currently we lose 174 173 zephyr-specific properties stored in the ZNotice_t 175 176 This has been somewhat addressed, but is still not lossless.177 174 */ 178 175 CALLER_OWN owl_message *owl_perlconfig_hashref2message(SV *msg) … … 220 217 owl_message_set_attribute(m, "adminheader", ""); 221 218 } 222 #ifdef HAVE_LIBZEPHYR223 if (owl_message_is_type_zephyr(m)) {224 ZNotice_t *n = &(m->notice);225 n->z_kind = ACKED;226 n->z_port = 0;227 n->z_auth = ZAUTH_NO;228 n->z_checked_auth = 0;229 n->z_class = zstr(owl_message_get_class(m));230 n->z_class_inst = zstr(owl_message_get_instance(m));231 n->z_opcode = zstr(owl_message_get_opcode(m));232 n->z_sender = zstr(owl_message_get_sender(m));233 n->z_recipient = zstr(owl_message_get_recipient(m));234 n->z_default_format = zstr("[zephyr created from perl]");235 n->z_multinotice = zstr("[zephyr created from perl]");236 n->z_num_other_fields = 0;237 n->z_message = g_strdup_printf("%s%c%s", owl_message_get_zsig(m), '\0', owl_message_get_body(m));238 n->z_message_len = strlen(owl_message_get_zsig(m)) + strlen(owl_message_get_body(m)) + 1;239 }240 #endif241 219 return m; 242 220 }
Note: See TracChangeset
for help on using the changeset viewer.