mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-15 20:45:57 +08:00
NoticeCenter支持安全类型转换,解决监听者参数类型不一致导致的bug
This commit is contained in:
@@ -135,9 +135,9 @@ inline void ShellSession::pleaseInputPasswd() {
|
||||
});
|
||||
};
|
||||
|
||||
auto flag = NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastShellLogin,_strUserName,passwd,invoker,static_cast<SockInfo &>(*this));
|
||||
if(!flag){
|
||||
//如果无人监听shell登录事件,那么默认shell无法登录
|
||||
auto flag = NOTICE_EMIT(BroadcastShellLoginArgs, Broadcast::kBroadcastShellLogin, _strUserName, passwd, invoker, *this);
|
||||
if (!flag) {
|
||||
// 如果无人监听shell登录事件,那么默认shell无法登录
|
||||
onAuth("please listen kBroadcastShellLogin event");
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user