Skip to content

Commit

Permalink
return desc for gb api
Browse files Browse the repository at this point in the history
  • Loading branch information
duiniuluantanqin committed Mar 8, 2024
1 parent 2cdeb6f commit 6c651e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions trunk/src/app/srs_app_gb28181.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2756,8 +2756,11 @@ srs_error_t SrsGoApiGbPublish::serve_http(ISrsHttpResponseWriter *w, ISrsHttpMes
SrsAutoFree(SrsJsonObject, res);

if ((err = do_serve_http(w, r, res)) != srs_success) {
srs_warn("GB error %s", srs_error_desc(err).c_str()); srs_freep(err);
return srs_api_response_code(w, r, SRS_CONSTS_HTTP_BadRequest);
srs_warn("GB error %s", srs_error_desc(err).c_str());
res->set("code", SrsJsonAny::integer(srs_error_code(err)));
res->set("desc", SrsJsonAny::str(srs_error_code_str(err).c_str()));
srs_freep(err);
return srs_api_response(w, r, res->dumps());
}

return srs_api_response(w, r, res->dumps());
Expand Down

0 comments on commit 6c651e7

Please sign in to comment.