split query into Uri-Query options

This commit is contained in:
Olaf Bergmann committed 2012-03-07 23:28:30 +01:00
1 parent 9c33dde944
commit 40de2a0c6b
1 file changed
+15
+15
View File
@@ -136,6 +136,21 @@ coap_new_request(coap_context_t *ctx, method_t m, coap_list_t *options ) {
COAP_OPTION_LENGTH(*(coap_option *)opt->data),
buf, &buflen);
while (res--) {
coap_add_option(pdu, COAP_OPTION_KEY(*(coap_option *)opt->data),
COAP_OPT_LENGTH(buf),
COAP_OPT_VALUE(buf));
buf += COAP_OPT_SIZE(buf);
}
} else if (COAP_OPTION_KEY(*(coap_option *)opt->data) ==
COAP_OPTION_URI_QUERY) {
buflen = BUFSIZE;
buf = _buf;
res = coap_split_query(COAP_OPTION_DATA(*(coap_option *)opt->data),
COAP_OPTION_LENGTH(*(coap_option *)opt->data),
buf, &buflen);
while (res--) {
coap_add_option(pdu, COAP_OPTION_KEY(*(coap_option *)opt->data),
COAP_OPT_LENGTH(buf),