winlin

fix #497, response error when client not found to kickoff. 2.0.194

... ... @@ -335,6 +335,7 @@ Remark:
## 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-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
... ... @@ -1029,6 +1030,7 @@ Winlin
[bug #484]: https://github.com/simple-rtmp-server/srs/issues/484
[bug #485]: https://github.com/simple-rtmp-server/srs/issues/485
[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 #458]: https://github.com/simple-rtmp-server/srs/issues/458
[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;
if (cid >= 0 && (client = stat->find_client(cid)) == NULL) {
ret = ERROR_RTMP_STREAM_NOT_FOUND;
srs_error("stream client_id=%d not found. ret=%d", cid, ret);
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);
}
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();
srs_warn("delete client=%d ok", cid);
srs_warn("kickoff client id=%d ok", cid);
return srs_api_response_code(w, r, ret);
} else if (r->is_http_get()) {
std::stringstream data;
... ...
... ... @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 193
#define VERSION_REVISION 194
// server info.
#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_RTSP_AUDIO_CONFIG 2047
#define ERROR_RTMP_STREAM_NOT_FOUND 2048
#define ERROR_RTMP_CLIENT_NOT_FOUND 2049
//
// system control message,
// not an error, but special control logic.
... ...