Skip to content

Commit

Permalink
test remove disconnect state
Browse files Browse the repository at this point in the history
  • Loading branch information
yushimeng committed Feb 4, 2024
1 parent 0d5fc78 commit 33b1a20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions trunk/src/app/srs_app_gb28181.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ void SrsLazyGbSipTcpConn::enqueue_sip_message(SrsSipMessage* msg)
}

void SrsLazyGbSipTcpConn::on_sip_disconnect() {
state_ = SrsGbSipStateDisconnect;
// state_ = SrsGbSipStateDisconnect;
this->wake_up();
}

Expand All @@ -627,9 +627,9 @@ void SrsLazyGbSipTcpConn::drive_state(SrsSipMessage* msg)
srs_sip_state(ostate, state_).c_str()); \
}

if (state_ == SrsGbSipStateDisconnect) {
return;
}
// if (state_ == SrsGbSipStateDisconnect) {
// return;
// }

//const char* mt = msg->type_ == HTTP_REQUEST ? "REQUEST" : "RESPONSE";
//const char* mm = msg->type_ == HTTP_REQUEST ? http_method_str(msg->method_) : "Response";
Expand Down Expand Up @@ -875,10 +875,10 @@ bool SrsLazyGbSipTcpConn::is_bye()
return state_ == SrsGbSipStateBye;
}

bool SrsLazyGbSipTcpConn::is_disconnect()
{
return state_ == SrsGbSipStateDisconnect;
}
// bool SrsLazyGbSipTcpConn::is_disconnect()
// {
// return state_ == SrsGbSipStateDisconnect;
// }

SrsGbSipState SrsLazyGbSipTcpConn::set_state(SrsGbSipState v)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/src/app/srs_app_gb28181.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ enum SrsGbSipState
SrsGbSipStateReinviting,
SrsGbSipStateStable,
SrsGbSipStateBye,
SrsGbSipStateDisconnect,
// SrsGbSipStateDisconnect,
};
std::string srs_gb_sip_state(SrsGbSipState state);

Expand Down Expand Up @@ -251,7 +251,7 @@ class SrsLazyGbSipTcpConn : public SrsLazyObject, public ISrsResource, public IS
bool is_stable();
// Whether SIP is bye bye.
bool is_bye();
bool is_disconnect();
// bool is_disconnect();
private:
SrsGbSipState set_state(SrsGbSipState v);
void wake_up();
Expand Down

0 comments on commit 33b1a20

Please sign in to comment.