FreeSWITCH - mod_xml_rpc源码分析三chanswitch.c
发布时间:2020-12-16 08:56:32 所属栏目:百科 来源:网络整理
导读:初始化和卸载 很奇怪,这个文件内也有初始化和卸载函数。而且和channel.c文件内一模一样的。ChanSwitchInit函数和ChannelInit函数内部一模一样。ChanSwitchTerm也和ChannelTerm函数一模一样。有点晕了,abyss库这是啥意思。 其他函数 其他函数都很简单。基本
初始化和卸载很奇怪,这个文件内也有初始化和卸载函数。而且和channel.c文件内一模一样的。ChanSwitchInit函数和ChannelInit函数内部一模一样。ChanSwitchTerm也和ChannelTerm函数一模一样。有点晕了,abyss库这是啥意思。
其他函数其他函数都很简单。基本上都如下面这个ChanSwitchAccept函数一样,最终调用了TChanSwitch保存的函数指针。
void ChanSwitchAccept(TChanSwitch * const chanSwitchP,TChannel ** const channelPP,void ** const channelInfoPP,const char ** const errorP) { if (SwitchTraceIsActive) fprintf(stderr,"Getting a connection from Channel switch %p...n",chanSwitchP); (*chanSwitchP->vtbl.accept)(chanSwitchP,channelPP,channelInfoPP,errorP); if (SwitchTraceIsActive) fprintf(stderr,"Got connection from channel switch. " "Channel = %pn",*channelPP); } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |