Lines Matching refs:err_code
256 int err_code; in mqtt_message_id_only_enc() local
268 err_code = pack_uint16(message_id, buf); in mqtt_message_id_only_enc()
269 if (err_code != 0) { in mqtt_message_id_only_enc()
270 return err_code; in mqtt_message_id_only_enc()
284 int err_code; in connect_request_encode() local
300 err_code = pack_utf8_str(mqtt_proto_desc, buf); in connect_request_encode()
301 if (err_code != 0) { in connect_request_encode()
302 return err_code; in connect_request_encode()
306 err_code = pack_uint8(client->protocol_version, buf); in connect_request_encode()
307 if (err_code != 0) { in connect_request_encode()
308 return err_code; in connect_request_encode()
316 err_code = pack_uint8(0, buf); in connect_request_encode()
317 if (err_code != 0) { in connect_request_encode()
318 return err_code; in connect_request_encode()
322 err_code = pack_uint16(client->keepalive, buf); in connect_request_encode()
323 if (err_code != 0) { in connect_request_encode()
324 return err_code; in connect_request_encode()
329 err_code = pack_utf8_str(&client->client_id, buf); in connect_request_encode()
330 if (err_code != 0) { in connect_request_encode()
331 return err_code; in connect_request_encode()
344 err_code = pack_utf8_str(&client->will_topic->topic, buf); in connect_request_encode()
345 if (err_code != 0) { in connect_request_encode()
346 return err_code; in connect_request_encode()
353 err_code = pack_utf8_str(client->will_message, buf); in connect_request_encode()
354 if (err_code != 0) { in connect_request_encode()
355 return err_code; in connect_request_encode()
359 err_code = zero_len_str_encode(buf); in connect_request_encode()
360 if (err_code != 0) { in connect_request_encode()
361 return err_code; in connect_request_encode()
373 err_code = pack_utf8_str(client->user_name, buf); in connect_request_encode()
374 if (err_code != 0) { in connect_request_encode()
375 return err_code; in connect_request_encode()
386 err_code = pack_utf8_str(client->password, buf); in connect_request_encode()
387 if (err_code != 0) { in connect_request_encode()
388 return err_code; in connect_request_encode()
403 int err_code; in publish_encode() local
415 err_code = pack_utf8_str(¶m->message.topic.topic, buf); in publish_encode()
416 if (err_code != 0) { in publish_encode()
417 return err_code; in publish_encode()
421 err_code = pack_uint16(param->message_id, buf); in publish_encode()
422 if (err_code != 0) { in publish_encode()
423 return err_code; in publish_encode()
432 err_code = mqtt_encode_fixed_header(message_type, start, buf); in publish_encode()
433 if (err_code != 0) { in publish_encode()
434 return err_code; in publish_encode()
498 int err_code, i; in subscribe_encode() local
510 err_code = pack_uint16(param->message_id, buf); in subscribe_encode()
511 if (err_code != 0) { in subscribe_encode()
512 return err_code; in subscribe_encode()
516 err_code = pack_utf8_str(¶m->list[i].topic, buf); in subscribe_encode()
517 if (err_code != 0) { in subscribe_encode()
518 return err_code; in subscribe_encode()
521 err_code = pack_uint8(param->list[i].qos, buf); in subscribe_encode()
522 if (err_code != 0) { in subscribe_encode()
523 return err_code; in subscribe_encode()
535 int err_code, i; in unsubscribe_encode() local
542 err_code = pack_uint16(param->message_id, buf); in unsubscribe_encode()
543 if (err_code != 0) { in unsubscribe_encode()
544 return err_code; in unsubscribe_encode()
548 err_code = pack_utf8_str(¶m->list[i].topic, buf); in unsubscribe_encode()
549 if (err_code != 0) { in unsubscribe_encode()
550 return err_code; in unsubscribe_encode()