[Devel] register_script_cb problems?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jun 20 16:11:25 CEST 2005


Hi Ingo,

indeed, the sl module was missing the REQ_TYPE_CB flag. It's fixed now.

thanks again,
bogdan


Ingo Wolfsberger wrote:

>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
>
>  
>




More information about the Devel mailing list