add content-type only if valid

This commit is contained in:
Olaf Bergmann committed 2010-10-23 23:14:59 +02:00
1 parent 5f544a99de
commit 5d46b03f09
1 file changed
+5 -3
+5 -3
View File
@@ -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