mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-09 02:32:53 +03:00
add content-type only if valid
This commit is contained in:
1 parent
5f544a99de
commit
5d46b03f09
1 file changed
+5
-3
+5
-3
@@ -450,9 +450,11 @@ cmdline_content_type(char *arg, unsigned short key) {
|
||||
q = p+1;
|
||||
}
|
||||
|
||||
node = new_option_node(key, valcnt, value);
|
||||
if (node)
|
||||
coap_insert( &optlist, node, order_opts );
|
||||
if (valcnt) {
|
||||
node = new_option_node(key, valcnt, value);
|
||||
if (node)
|
||||
coap_insert( &optlist, node, order_opts );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in new issue
Block a user