static void parse_filelist(char *p_hostfile)
{
    int i = 0;
    for (i = 0; pvm_filelist[i].name != NULL; i++) {
        TCList *list = module_read_config_list(p_hostfile,
                                               pvm_filelist[i].name, 
                                               __FILE__);
        if (list) {
            int type = pvm_filelist[i].type;
            char *codec = (type == TC_VIDEO) 
                                ?addvideo_codec :addaudio_codec;
            char *dest = (type == TC_VIDEO) 
                                ?addvideo_destination :addaudio_destination;
            pvm_config_filelist *tail = NULL;
            pvm_config_filelist *head = dispatch_list(list, type,
                                                      codec, dest, &tail);
            if (head) { /* then tail is valid too */
                pvm_filelist[i].parsed = 1;
                if (*(pvm_filelist[i].list) != NULL) {
                    tail->p_next = *(pvm_filelist[i].list);
                }
                *(pvm_filelist[i].list) = head;
            }
            /* always */
            module_free_config_list(list, (head != NULL) ?1 :0);
        }
    }
}
Exemple #2
0
/* 分发此时到期的定时事件, 此函数会以线程安全的方式不断监测是否有新添加进来的当前时间就过期的定时事件.
 * 如果检查到就一并分发, 如果检查不到就会留至下一次分发时分发. */
static inline void
timer_execute(struct timer *T) {
	int idx = T->time & TIME_NEAR_MASK;
	
	while (T->near[idx].head.next) {
		struct timer_node *current = link_clear(&T->near[idx]);
		SPIN_UNLOCK(T);
		// dispatch_list don't need lock T
		dispatch_list(current);
		SPIN_LOCK(T);
	}
}
Exemple #3
0
pms_pending_keys	Input::dispatch()
{
	this->pending = PEND_NONE;
	this->param.clear();

	if (_mode == INPUT_NORMAL)
		return dispatch_normal();
	else if (_mode == INPUT_LIST)
		return dispatch_list();
	else
		return dispatch_text();

	return PEND_NONE;
}