mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-31 15:05:46 +03:00
split query into Uri-Query options
This commit is contained in:
1 parent
9c33dde944
commit
40de2a0c6b
1 file changed
+15
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user