mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复close stream接口返回code不正确的问题
This commit is contained in:
parent
8cb564de0a
commit
67e49cb66e
@ -496,12 +496,12 @@ void installWebApi() {
|
||||
allArgs["vhost"],
|
||||
allArgs["app"],
|
||||
allArgs["stream"]);
|
||||
if(src){
|
||||
if (src) {
|
||||
bool flag = src->close(allArgs["force"].as<bool>());
|
||||
val["result"] = flag ? 0 : -1;
|
||||
val["msg"] = flag ? "success" : "close failed";
|
||||
val["code"] = API::OtherFailed;
|
||||
}else{
|
||||
val["code"] = flag ? API::Success : API::OtherFailed;
|
||||
} else {
|
||||
val["result"] = -2;
|
||||
val["msg"] = "can not find the stream";
|
||||
val["code"] = API::OtherFailed;
|
||||
|
Loading…
Reference in New Issue
Block a user