mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #497, response error when client not found to kickoff. 2.0.194
This commit is contained in:
parent
a3c229472e
commit
7811b4f3f7
4 changed files with 12 additions and 5 deletions
|
@ -335,6 +335,7 @@ Remark:
|
||||||
|
|
||||||
## History
|
## History
|
||||||
|
|
||||||
|
* v2.0, 2015-10-01, for [#497][bug #497] response error when client not found to kickoff. 2.0.194
|
||||||
* v2.0, 2015-10-01, for [#495][bug #495] decrease the srs-librtmp size. 2.0.193
|
* v2.0, 2015-10-01, for [#495][bug #495] decrease the srs-librtmp size. 2.0.193
|
||||||
* v2.0, 2015-09-23, for [#485][bug #485] error when arm glibc 2.15+ or not i386/x86_64/amd64. 2.0.192
|
* v2.0, 2015-09-23, for [#485][bug #485] error when arm glibc 2.15+ or not i386/x86_64/amd64. 2.0.192
|
||||||
* v2.0, 2015-09-23, for [#485][bug #485] srs for respberrypi and cubieboard. 2.0.191
|
* v2.0, 2015-09-23, for [#485][bug #485] srs for respberrypi and cubieboard. 2.0.191
|
||||||
|
@ -1029,6 +1030,7 @@ Winlin
|
||||||
[bug #484]: https://github.com/simple-rtmp-server/srs/issues/484
|
[bug #484]: https://github.com/simple-rtmp-server/srs/issues/484
|
||||||
[bug #485]: https://github.com/simple-rtmp-server/srs/issues/485
|
[bug #485]: https://github.com/simple-rtmp-server/srs/issues/485
|
||||||
[bug #495]: https://github.com/simple-rtmp-server/srs/issues/495
|
[bug #495]: https://github.com/simple-rtmp-server/srs/issues/495
|
||||||
|
[bug #497]: https://github.com/simple-rtmp-server/srs/issues/497
|
||||||
[bug #475]: https://github.com/simple-rtmp-server/srs/issues/475
|
[bug #475]: https://github.com/simple-rtmp-server/srs/issues/475
|
||||||
[bug #458]: https://github.com/simple-rtmp-server/srs/issues/458
|
[bug #458]: https://github.com/simple-rtmp-server/srs/issues/458
|
||||||
[bug #454]: https://github.com/simple-rtmp-server/srs/issues/454
|
[bug #454]: https://github.com/simple-rtmp-server/srs/issues/454
|
||||||
|
|
|
@ -794,16 +794,20 @@ int SrsGoApiClients::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
||||||
|
|
||||||
SrsStatisticClient* client = NULL;
|
SrsStatisticClient* client = NULL;
|
||||||
if (cid >= 0 && (client = stat->find_client(cid)) == NULL) {
|
if (cid >= 0 && (client = stat->find_client(cid)) == NULL) {
|
||||||
ret = ERROR_RTMP_STREAM_NOT_FOUND;
|
ret = ERROR_RTMP_CLIENT_NOT_FOUND;
|
||||||
srs_error("stream client_id=%d not found. ret=%d", cid, ret);
|
srs_error("client id=%d not found. ret=%d", cid, ret);
|
||||||
return srs_api_response_code(w, r, ret);
|
return srs_api_response_code(w, r, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->is_http_delete()) {
|
if (r->is_http_delete()) {
|
||||||
srs_assert(client);
|
if (!client) {
|
||||||
|
ret = ERROR_RTMP_CLIENT_NOT_FOUND;
|
||||||
|
srs_error("client id=%d not found. ret=%d", cid, ret);
|
||||||
|
return srs_api_response_code(w, r, ret);
|
||||||
|
}
|
||||||
|
|
||||||
client->conn->expire();
|
client->conn->expire();
|
||||||
srs_warn("delete client=%d ok", cid);
|
srs_warn("kickoff client id=%d ok", cid);
|
||||||
return srs_api_response_code(w, r, ret);
|
return srs_api_response_code(w, r, ret);
|
||||||
} else if (r->is_http_get()) {
|
} else if (r->is_http_get()) {
|
||||||
std::stringstream data;
|
std::stringstream data;
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 193
|
#define VERSION_REVISION 194
|
||||||
|
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
|
@ -150,6 +150,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#define ERROR_RTP_TYPE97_CORRUPT 2046
|
#define ERROR_RTP_TYPE97_CORRUPT 2046
|
||||||
#define ERROR_RTSP_AUDIO_CONFIG 2047
|
#define ERROR_RTSP_AUDIO_CONFIG 2047
|
||||||
#define ERROR_RTMP_STREAM_NOT_FOUND 2048
|
#define ERROR_RTMP_STREAM_NOT_FOUND 2048
|
||||||
|
#define ERROR_RTMP_CLIENT_NOT_FOUND 2049
|
||||||
//
|
//
|
||||||
// system control message,
|
// system control message,
|
||||||
// not an error, but special control logic.
|
// not an error, but special control logic.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue