[Devel] register_script_cb problems?
Ingo Wolfsberger
iwolfsberger at gmx.net
Mon Jun 20 15:49:07 CEST 2005
Hi Bogdan,
> indeed there is small bug in the code - in second block, the "if" must
> test against "RPL_TYPE_CB" flag - looks like copy and paste error :(.
>
> regarding the error message you get: note that in head version the
> callbacks were split in two type: callback for request and for replies
> (before all were fixed and called for both types of messages).
> When you register a callback you have to specify two flags: (REQ_TYPE_CB
> or RPL_TYPE_CB - both can pe set) and (PRE_SCRIPT_CB or POST_SCRIPT_CB -
> only one can e set).
>
> most probably your module doesn't set the xxx_TYPE_CB flag.
The sl module makes the wrong function call:
sip-server/modules/sl/sl.c
static int mod_init(void)
{
fprintf(stderr, "stateless - initializing\n");
if (init_sl_stats()<0) {
LOG(L_ERR, "ERROR: init_sl_stats failed\n");
return -1;
}
/* if SL loaded, filter ACKs on beginning */
register_script_cb( sl_filter_ACK, PRE_SCRIPT_CB, 0 );
sl_startup();
return 0;
}
bye,
Ingo
--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
More information about the Devel
mailing list