Hi,
I am having trouble understanding a piece of code in the function
monitor_dial of the file main/dial.c

who = ast_waitfor_n(cs, pos, &timeout);

/* If the timeout no longer exists OR *if we got no channel* it basically
means the timeout was tripped, so handle it */
if (!timeout || !who) {
    timeout = handle_timeout_trip(dial, start);
    continue;
}

my question is what will be the reason for not having the channel "who" as
mentioned in the comment above the condition?
The reason I am asking this is that "who" is returned from the channel list
"cs" which cannot be of size 0 as the "count" variable is being checked and
also the "pos" value can't be less than 1.

can please anybody explain what could be the conditions for "who" to be
returned NULL.
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to