Fix CoAP not handling certain types of ACKs (#1352)

* Fix CoAP not handling certain types of ACKs

ACK's with piggyback data and 2.00-2.03 response codes were ignored.
This commit is contained in:
Giedrius
2017-02-22 05:42:00 -08:00
committed by Jonathan Hui
parent 30db14f429
commit 88ab0d51a5
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -78,6 +78,10 @@ typedef enum otCoapCode
kCoapRequestPost = 0x02, ///< Post
kCoapRequestPut = 0x03, ///< Put
kCoapRequestDelete = 0x04, ///< Delete
kCoapResponseCodeMin = 0x40, ///< 2.00
kCoapResponseCreated = 0x41, ///< Created
kCoapResponseDeleted = 0x42, ///< Deleted
kCoapResponseValid = 0x43, ///< Valid
kCoapResponseChanged = 0x44, ///< Changed
kCoapResponseContent = 0x45, ///< Content
} otCoapCode;
+1 -1
View File
@@ -380,7 +380,7 @@ public:
* @retval FALSE Header is not a response header.
*
*/
bool IsResponse(void) const { return (GetCode() >= kCoapResponseChanged); };
bool IsResponse(void) const { return (GetCode() >= kCoapResponseCodeMin); };
/**
* This method checks if a header is a CON message header.