Lines Matching refs:err_code

24 	int err_code = 0;  in mqtt_handle_packet()  local
36 err_code = connect_ack_decode(client, buf, &evt.param.connack); in mqtt_handle_packet()
37 if (err_code == 0) { in mqtt_handle_packet()
46 err_code = -ECONNREFUSED; in mqtt_handle_packet()
51 evt.result = err_code; in mqtt_handle_packet()
60 err_code = publish_decode(type_and_flags, var_length, buf, in mqtt_handle_packet()
62 evt.result = err_code; in mqtt_handle_packet()
78 err_code = publish_ack_decode(buf, &evt.param.puback); in mqtt_handle_packet()
79 evt.result = err_code; in mqtt_handle_packet()
86 err_code = publish_receive_decode(buf, &evt.param.pubrec); in mqtt_handle_packet()
87 evt.result = err_code; in mqtt_handle_packet()
94 err_code = publish_release_decode(buf, &evt.param.pubrel); in mqtt_handle_packet()
95 evt.result = err_code; in mqtt_handle_packet()
102 err_code = publish_complete_decode(buf, &evt.param.pubcomp); in mqtt_handle_packet()
103 evt.result = err_code; in mqtt_handle_packet()
110 err_code = subscribe_ack_decode(buf, &evt.param.suback); in mqtt_handle_packet()
111 evt.result = err_code; in mqtt_handle_packet()
118 err_code = unsubscribe_ack_decode(buf, &evt.param.unsuback); in mqtt_handle_packet()
119 evt.result = err_code; in mqtt_handle_packet()
145 return err_code; in mqtt_handle_packet()
201 int err_code; in mqtt_read_publish_var_header() local
205 err_code = mqtt_read_message_chunk(client, buf, sizeof(uint16_t)); in mqtt_read_publish_var_header()
206 if (err_code < 0) { in mqtt_read_publish_var_header()
207 return err_code; in mqtt_read_publish_var_header()
222 err_code = mqtt_read_message_chunk(client, buf, in mqtt_read_publish_var_header()
224 if (err_code < 0) { in mqtt_read_publish_var_header()
225 return err_code; in mqtt_read_publish_var_header()
238 int err_code; in mqtt_read_and_parse_fixed_header() local
241 err_code = mqtt_read_message_chunk(client, buf, chunk_size); in mqtt_read_and_parse_fixed_header()
242 if (err_code < 0) { in mqtt_read_and_parse_fixed_header()
243 return err_code; in mqtt_read_and_parse_fixed_header()
250 err_code = fixed_header_decode(buf, type_and_flags, var_length); in mqtt_read_and_parse_fixed_header()
251 } while (err_code == -EAGAIN); in mqtt_read_and_parse_fixed_header()
253 return err_code; in mqtt_read_and_parse_fixed_header()
258 int err_code; in mqtt_handle_rx() local
266 err_code = mqtt_read_and_parse_fixed_header(client, &type_and_flags, in mqtt_handle_rx()
268 if (err_code < 0) { in mqtt_handle_rx()
269 return (err_code == -EAGAIN) ? 0 : err_code; in mqtt_handle_rx()
273 err_code = mqtt_read_publish_var_header(client, type_and_flags, in mqtt_handle_rx()
276 err_code = mqtt_read_message_chunk(client, &buf, var_length); in mqtt_handle_rx()
279 if (err_code < 0) { in mqtt_handle_rx()
280 return (err_code == -EAGAIN) ? 0 : err_code; in mqtt_handle_rx()
284 err_code = mqtt_handle_packet(client, type_and_flags, var_length, &buf); in mqtt_handle_rx()
285 if (err_code < 0) { in mqtt_handle_rx()
286 return err_code; in mqtt_handle_rx()