net: zoap: add missing response code for zoap_header_get_code()
Three response codes are missed in zoap_header_get_code() which will result in the response code returned from the function being set as ZOAP_CODE_EMPTY. Check include/net/zoap.h for the missing code definition. Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
This commit is contained in:
parent
514a07a9e2
commit
7087162385
|
@ -1003,6 +1003,7 @@ u8_t zoap_header_get_code(const struct zoap_packet *zpkt)
|
|||
case ZOAP_RESPONSE_CODE_VALID:
|
||||
case ZOAP_RESPONSE_CODE_CHANGED:
|
||||
case ZOAP_RESPONSE_CODE_CONTENT:
|
||||
case ZOAP_RESPONSE_CODE_CONTINUE:
|
||||
case ZOAP_RESPONSE_CODE_BAD_REQUEST:
|
||||
case ZOAP_RESPONSE_CODE_UNAUTHORIZED:
|
||||
case ZOAP_RESPONSE_CODE_BAD_OPTION:
|
||||
|
@ -1010,8 +1011,10 @@ u8_t zoap_header_get_code(const struct zoap_packet *zpkt)
|
|||
case ZOAP_RESPONSE_CODE_NOT_FOUND:
|
||||
case ZOAP_RESPONSE_CODE_NOT_ALLOWED:
|
||||
case ZOAP_RESPONSE_CODE_NOT_ACCEPTABLE:
|
||||
case ZOAP_RESPONSE_CODE_INCOMPLETE:
|
||||
case ZOAP_RESPONSE_CODE_PRECONDITION_FAILED:
|
||||
case ZOAP_RESPONSE_CODE_REQUEST_TOO_LARGE:
|
||||
case ZOAP_RESPONSE_CODE_UNSUPPORTED_CONTENT_FORMAT:
|
||||
case ZOAP_RESPONSE_CODE_INTERNAL_ERROR:
|
||||
case ZOAP_RESPONSE_CODE_NOT_IMPLEMENTED:
|
||||
case ZOAP_RESPONSE_CODE_BAD_GATEWAY:
|
||||
|
|
Loading…
Reference in New Issue