switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_DEBUG,"binding for %s in section %s with key %s and value %s requested from node %s\n",tag_name,sectionstr,key_name,key_value,ptr->process.pid.node);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_DEBUG,"binding for %s in section %s with key %s and value %s requested from node %s\n",tag_name,sectionstr,key_name,key_value,ptr->process.pid.node);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_DEBUG,"no binding for %s\n",sectionstr);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_DEBUG,"no binding for %s\n",sectionstr);
gotocleanup;
gotocleanup;
}
}
/* Tell the threads to be ready, and wait five seconds for a reply. */
/* Tell the threads to be ready, and wait five seconds for a reply. */
switch_mutex_lock(globals.fetch_reply_mutex);
switch_mutex_lock(p->mutex);
p->state=reply_waiting;
//p->state = reply_waiting;
switch_thread_cond_broadcast(p->ready_or_found);
switch_thread_cond_timedwait(p->ready_or_found,
switch_thread_cond_timedwait(p->ready_or_found,
globals.fetch_reply_mutex,5000000);
p->mutex,5000000);
if(!p->reply){
if(!p->reply){
p->state=reply_timeout;
p->state=reply_timeout;
switch_mutex_unlock(globals.fetch_reply_mutex);
switch_mutex_unlock(p->mutex);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_WARNING,"Timed out after %d milliseconds when waiting for XML fetch response for %s\n",(int)(switch_micro_time_now()-now)/1000,uuid_str);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_WARNING,"Timed out after %d milliseconds when waiting for XML fetch response for %s\n",(int)(switch_micro_time_now()-now)/1000,uuid_str);