Changeset 147d880
- Timestamp:
- Aug 25, 2008, 8:11:12 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 740d5f7
- Parents:
- da466e0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
message.c
r719c699 r147d880 42 42 owl_message_set_direction_none(m); 43 43 m->delete=0; 44 m->zwriteline=NULL;45 44 46 45 owl_message_set_hostname(m, ""); … … 485 484 char *owl_message_get_zwriteline(owl_message *m) 486 485 { 487 if(!m->zwriteline)488 489 return (m->zwriteline);486 char *z = owl_message_get_attribute_value(m, "zwriteline"); 487 if (!z) return ""; 488 return z; 490 489 } 491 490 492 491 void owl_message_set_zwriteline(owl_message *m, char *line) 493 492 { 494 if(m->zwriteline) owl_free(m->zwriteline); 495 m->zwriteline=owl_strdup(line); 493 owl_message_set_attribute(m, "zwriteline", line); 496 494 } 497 495 … … 860 858 } 861 859 862 m->zwriteline=owl_strdup("");863 864 860 /* save the hostname */ 865 861 owl_function_debugmsg("About to do gethostbyaddr"); … … 942 938 } 943 939 944 m->zwriteline=owl_strdup("");945 946 940 owl_message_set_body(m, "<uninitialized>"); 947 941 … … 975 969 owl_message_set_opcode(m, owl_zwrite_get_opcode(&z)); 976 970 owl_message_set_realm(m, owl_zwrite_get_realm(&z)); /* also a hack, but not here */ 977 m->zwriteline=owl_strdup(line);971 owl_message_set_zwriteline(m, line); 978 972 owl_message_set_body(m, body); 979 973 owl_message_set_zsig(m, zsig); … … 1016 1010 #endif 1017 1011 if (m->timestr) owl_free(m->timestr); 1018 if (m->zwriteline) owl_free(m->zwriteline);1019 1012 1020 1013 /* free all the attributes */ -
owl.h
r0504f63 r147d880 342 342 char *timestr; 343 343 time_t time; 344 char *zwriteline;345 344 } owl_message; 346 345
Note: See TracChangeset
for help on using the changeset viewer.