Changeset 17eed9c for perlglue.xs
- Timestamp:
- Dec 24, 2006, 11:21:21 AM (18 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 23be736
- Parents:
- fe0a16a
- git-author:
- Nelson Elhage <nelhage@mit.edu> (12/23/06 23:56:27)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (12/24/06 11:21:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlglue.xs
rb6a253c r17eed9c 122 122 croak("Usage: owl::queue_message($message)"); 123 123 } 124 124 125 125 hash = (HV*)SvRV(msg); 126 126 m = owl_malloc(sizeof(owl_message)); 127 127 owl_message_init(m); 128 128 129 129 count = hv_iterinit(hash); 130 130 while((ent = hv_iternext(hash))) { … … 135 135 } else if(!strcmp(key, "direction")) { 136 136 owl_message_set_direction(m, owl_message_parse_direction(val)); 137 } else if(!strcmp(key, " isprivate")) {137 } else if(!strcmp(key, "private")) { 138 138 SV * v = hv_iterval(hash, ent); 139 139 if(SvTRUE(v)) { 140 140 owl_message_set_isprivate(m); 141 141 } 142 } else if (!strcmp(key, "hostname")) { 143 owl_message_set_hostname(m, val); 144 } else if (!strcmp(key, "zwriteline")) { 145 owl_message_set_zwriteline(m, val); 146 } else if (!strcmp(key, "time")) { 147 m->timestr = owl_strdup(val); 148 struct tm tm; 149 strptime(val, "%a %b %d %T %Y", &tm); 150 m->time = mktime(&tm); 142 151 } else { 143 152 owl_message_set_attribute(m, key, val);
Note: See TracChangeset
for help on using the changeset viewer.