Lines Matching +full:- +full:r
5 * SPDX-License-Identifier: Apache-2.0
27 int i, r; in query_get() local
34 r = coap_find_options(request, COAP_OPTION_URI_QUERY, options, 4); in query_get()
35 if (r < 0) { in query_get()
36 return -EINVAL; in query_get()
41 LOG_INF("num queries: %d", r); in query_get()
43 for (i = 0; i < r; i++) { in query_get()
61 r = coap_packet_init(&response, data, sizeof(data), in query_get()
64 if (r < 0) { in query_get()
65 return r; in query_get()
68 r = coap_append_option_int(&response, COAP_OPTION_CONTENT_FORMAT, in query_get()
70 if (r < 0) { in query_get()
71 return r; in query_get()
74 r = coap_packet_append_payload_marker(&response); in query_get()
75 if (r < 0) { in query_get()
76 return r; in query_get()
79 /* The response that coap-client expects */ in query_get()
80 r = snprintk((char *) payload, sizeof(payload), in query_get()
82 if (r < 0) { in query_get()
83 return r; in query_get()
86 r = coap_packet_append_payload(&response, (uint8_t *)payload, in query_get()
88 if (r < 0) { in query_get()
89 return r; in query_get()
92 r = coap_resource_send(resource, &response, addr, addr_len, NULL); in query_get()
94 return r; in query_get()