mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-07 02:02:54 +03:00
coap_debug.c: Check value of COAP_DEBUG_BUF_SIZE
The technical lower bound of COAP_DEBUG_BUF_SIZE in the code is 5. Sensible values should be significantly larger than 32 to ensure that information can be displayed through this buffer.
This commit is contained in:
1 parent
9e0fe9a14f
commit
ae9429fc20
1 file changed
+4
@@ -473,6 +473,10 @@ is_binary(int content_format) {
|
||||
*
|
||||
*/
|
||||
|
||||
#if COAP_DEBUG_BUF_SIZE < 5
|
||||
#error "COAP_DEBUG_BUF_SIZE must be at least 5, should be >= 32 to be useful"
|
||||
#endif /* COAP_DEBUG_BUF_SIZE < 5 */
|
||||
|
||||
void
|
||||
coap_show_pdu(coap_log_t level, const coap_pdu_t *pdu) {
|
||||
#if COAP_CONSTRAINED_STACK
|
||||
|
||||
Reference in new issue
Block a user