Lines Matching +full:- +full:r

5  * SPDX-License-Identifier: Apache-2.0
31 int r; in large_get() local
37 r = coap_update_from_block(request, &ctx); in large_get()
38 if (r < 0) { in large_get()
39 return -EINVAL; in large_get()
51 r = coap_packet_init(&response, data, sizeof(data), in large_get()
54 if (r < 0) { in large_get()
55 return -EINVAL; in large_get()
58 r = coap_append_option_int(&response, COAP_OPTION_CONTENT_FORMAT, in large_get()
60 if (r < 0) { in large_get()
61 return r; in large_get()
64 r = coap_append_block2_option(&response, &ctx); in large_get()
65 if (r < 0) { in large_get()
66 return r; in large_get()
69 r = coap_packet_append_payload_marker(&response); in large_get()
70 if (r < 0) { in large_get()
71 return r; in large_get()
75 ctx.total_size - ctx.current); in large_get()
79 r = coap_packet_append_payload(&response, (uint8_t *)payload, size); in large_get()
80 if (r < 0) { in large_get()
81 return r; in large_get()
84 r = coap_next_block(&response, &ctx); in large_get()
85 if (!r) { in large_get()
90 r = coap_resource_send(resource, &response, addr, addr_len, NULL); in large_get()
92 return r; in large_get()
109 int r; in large_update_put() local
112 r = coap_get_option_int(request, COAP_OPTION_BLOCK1); in large_update_put()
113 if (r < 0) { in large_update_put()
114 return -EINVAL; in large_update_put()
117 last_block = !GET_MORE(r); in large_update_put()
120 if (!GET_BLOCK_NUM(r)) { in large_update_put()
124 r = coap_update_from_block(request, &ctx); in large_update_put()
125 if (r < 0) { in large_update_put()
127 return -EINVAL; in large_update_put()
133 return -EINVAL; in large_update_put()
159 r = coap_ack_init(&response, request, data, sizeof(data), code); in large_update_put()
160 if (r < 0) { in large_update_put()
161 return r; in large_update_put()
164 r = coap_append_block1_option(&response, &ctx); in large_update_put()
165 if (r < 0) { in large_update_put()
167 return r; in large_update_put()
170 r = coap_resource_send(resource, &response, addr, addr_len, NULL); in large_update_put()
172 return r; in large_update_put()
189 int r; in large_create_post() local
192 r = coap_get_option_int(request, COAP_OPTION_BLOCK1); in large_create_post()
193 if (r < 0) { in large_create_post()
194 return -EINVAL; in large_create_post()
197 last_block = !GET_MORE(r); in large_create_post()
200 if (!GET_BLOCK_NUM(r)) { in large_create_post()
204 r = coap_update_from_block(request, &ctx); in large_create_post()
205 if (r < 0) { in large_create_post()
207 return -EINVAL; in large_create_post()
213 return -EINVAL; in large_create_post()
231 r = coap_ack_init(&response, request, data, sizeof(data), code); in large_create_post()
232 if (r < 0) { in large_create_post()
233 return r; in large_create_post()
236 r = coap_append_block1_option(&response, &ctx); in large_create_post()
237 if (r < 0) { in large_create_post()
239 return r; in large_create_post()
242 r = coap_resource_send(resource, &response, addr, addr_len, NULL); in large_create_post()
244 return r; in large_create_post()
254 static const char * const large_update_path[] = { "large-update", NULL };
261 static const char * const large_create_path[] = { "large-create", NULL };