Commit ba947cb6 by ziyue

调整switch case语句缩进

parent f85de2e1
......@@ -322,15 +322,9 @@ bool HandshakePacket::loadExtMessage(uint8_t *buf, size_t len) {
length = loadUint16(ptr + 2);
switch (type) {
case HSExt::SRT_CMD_HSREQ:
case HSExt::SRT_CMD_HSRSP:
ext = std::make_shared<HSExtMessage>();
break;
case HSExt::SRT_CMD_SID:
ext = std::make_shared<HSExtStreamID>();
break;
default:
WarnL << "not support ext " << type;
break;
case HSExt::SRT_CMD_HSRSP: ext = std::make_shared<HSExtMessage>(); break;
case HSExt::SRT_CMD_SID: ext = std::make_shared<HSExtStreamID>(); break;
default: WarnL << "not support ext " << type; break;
}
if (ext) {
if (ext->loadFromData(ptr, length * 4 + 4)) {
......
......@@ -123,21 +123,10 @@ DepLibSRTP::DepLibSRTP() {
err = srtp_install_event_handler([](srtp_event_data_t *data) {
MS_TRACE();
switch (data->event) {
case event_ssrc_collision:
MS_WARN_TAG(srtp, "SSRC collision occurred");
break;
case event_key_soft_limit:
MS_WARN_TAG(srtp, "stream reached the soft key usage limit and will expire soon");
break;
case event_key_hard_limit:
MS_WARN_TAG(srtp, "stream reached the hard key usage limit and has expired");
break;
case event_packet_index_limit:
MS_WARN_TAG(srtp, "stream reached the hard packet limit (2^48 packets)");
break;
case event_ssrc_collision: MS_WARN_TAG(srtp, "SSRC collision occurred"); break;
case event_key_soft_limit: MS_WARN_TAG(srtp, "stream reached the soft key usage limit and will expire soon"); break;
case event_key_hard_limit: MS_WARN_TAG(srtp, "stream reached the hard key usage limit and has expired"); break;
case event_packet_index_limit: MS_WARN_TAG(srtp, "stream reached the hard packet limit (2^48 packets)"); break;
}
});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论