[Freeswitch-users] hanging problem with switch_scheduler_add_task

mark morreny markmorreny at gmail.com
Fri Aug 21 08:41:13 PDT 2009


I am experiencing some hanging when fs is executing

switch_scheduler_add_task(switch_epoch_time_now(NULL) , data_flush_callback,

I place switch_scheduler_add_task in my SWITCH_MODULE_LOAD_FUNCTION and
sometimes, hanging occurs on that particular line.  My data_flush_callback
is as follows.  I debug the module and it does not even enter
data_flush_callback.  It is hanging at switch_scheduler_add_task().

SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {

    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "starting to
flush cdr record...\n");

    int last_sequence = flush_data_to_csv();
    if (last_sequence > -1 ) {

    task->runtime = switch_epoch_time_now(NULL) + globals.cycle_time;


Does anyone know why?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090821/0d6b2da6/attachment-0002.html 

More information about the FreeSWITCH-users mailing list