static int ki_ht_iterator_start(sip_msg_t *msg, str *iname, str *hname) { if(iname==NULL || iname->s==NULL || iname->len<=0 || hname==NULL || hname->s==NULL || hname->len<=0) { LM_ERR("invalid parameters\n"); return -1; } if(ht_iterator_start(iname, hname)<0) return -1; return 1; }
static int w_ht_iterator_start(struct sip_msg* msg, char* iname, char* hname) { str siname; str shname; if(fixup_get_svalue(msg, (gparam_t*)iname, &siname)<0 || siname.len<=0) { LM_ERR("cannot get iterator name\n"); return -1; } if(fixup_get_svalue(msg, (gparam_t*)hname, &shname)<0 || shname.len<=0) { LM_ERR("cannot get hash table name\n"); return -1; } if(ht_iterator_start(&siname, &shname)<0) return -1; return 1; }