Changeset 17eed9c


Ignore:
Timestamp:
Dec 24, 2006, 11:21:21 AM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
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)
Message:
Letting owl::queue_message set more fields of the message
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    rb6a253c r17eed9c  
    122122                        croak("Usage: owl::queue_message($message)");
    123123                }
    124                
     124
    125125                hash = (HV*)SvRV(msg);
    126126                m = owl_malloc(sizeof(owl_message));
    127127                owl_message_init(m);
    128                
     128
    129129                count = hv_iterinit(hash);
    130130                while((ent = hv_iternext(hash))) {
     
    135135                        } else if(!strcmp(key, "direction")) {
    136136                                owl_message_set_direction(m, owl_message_parse_direction(val));
    137                         } else if(!strcmp(key, "isprivate")) {
     137                        } else if(!strcmp(key, "private")) {
    138138                                SV * v = hv_iterval(hash, ent);
    139139                                if(SvTRUE(v)) {
    140140                                        owl_message_set_isprivate(m);
    141141                                }
     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);
    142151                        } else {
    143152                                owl_message_set_attribute(m, key, val);
Note: See TracChangeset for help on using the changeset viewer.