Skip to content

Commit

Permalink
fix typo of INVLIAD to INVALID
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Oct 20, 2015
1 parent 5de65d4 commit 91e9fc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions trunk/src/app/srs_app_http_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,22 +431,22 @@ int SrsHttpHooks::do_post(std::string url, std::string req, int& code, string& r
// ensure the http status is ok.
// https://github.com/simple-rtmp-server/srs/issues/158
if (code != SRS_CONSTS_HTTP_OK) {
ret = ERROR_HTTP_STATUS_INVLIAD;
ret = ERROR_HTTP_STATUS_INVALID;
srs_error("invalid response status=%d. ret=%d", code, ret);
return ret;
}

// should never be empty.
if (res.empty()) {
ret = ERROR_HTTP_DATA_INVLIAD;
ret = ERROR_HTTP_DATA_INVALID;
srs_error("invalid empty response. ret=%d", ret);
return ret;
}

// parse string res to json.
SrsJsonAny* info = SrsJsonAny::loads((char*)res.c_str());
if (!info) {
ret = ERROR_HTTP_DATA_INVLIAD;
ret = ERROR_HTTP_DATA_INVALID;
srs_error("invalid response %s. ret=%d", res.c_str(), ret);
return ret;
}
Expand All @@ -455,7 +455,7 @@ int SrsHttpHooks::do_post(std::string url, std::string req, int& code, string& r
// response error code in string.
if (!info->is_object()) {
if (res != SRS_HTTP_RESPONSE_OK) {
ret = ERROR_HTTP_DATA_INVLIAD;
ret = ERROR_HTTP_DATA_INVALID;
srs_error("invalid response number %s. ret=%d", res.c_str(), ret);
return ret;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/src/kernel/srs_kernel_error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
///////////////////////////////////////////////////////
#define ERROR_RTMP_PLAIN_REQUIRED 2000
#define ERROR_RTMP_CHUNK_START 2001
#define ERROR_RTMP_MSG_INVLIAD_SIZE 2002
#define ERROR_RTMP_MSG_INVALID_SIZE 2002
#define ERROR_RTMP_AMF0_DECODE 2003
#define ERROR_RTMP_AMF0_INVALID 2004
#define ERROR_RTMP_REQ_CONNECT 2005
Expand Down Expand Up @@ -170,7 +170,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ERROR_HLS_AAC_FRAME_LENGTH 3005
#define ERROR_HLS_AVC_SAMPLE_SIZE 3006
#define ERROR_HTTP_PARSE_URI 3007
#define ERROR_HTTP_DATA_INVLIAD 3008
#define ERROR_HTTP_DATA_INVALID 3008
#define ERROR_HTTP_PARSE_HEADER 3009
#define ERROR_HTTP_HANDLER_MATCH_URL 3010
#define ERROR_HTTP_HANDLER_INVALID 3011
Expand Down Expand Up @@ -238,7 +238,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ERROR_HTTP_URL_NOT_CLEAN 4002
#define ERROR_HTTP_CONTENT_LENGTH 4003
#define ERROR_HTTP_LIVE_STREAM_EXT 4004
#define ERROR_HTTP_STATUS_INVLIAD 4005
#define ERROR_HTTP_STATUS_INVALID 4005
#define ERROR_KERNEL_AAC_STREAM_CLOSED 4006
#define ERROR_AAC_DECODE_ERROR 4007
#define ERROR_KERNEL_MP3_STREAM_CLOSED 4008
Expand Down

0 comments on commit 91e9fc7

Please sign in to comment.