Lines Matching refs:packetlen
258 size_t packetlen = 0; in mqtt_connect() local
287 packetlen = payloadlen + 10 + remain_pos + 1; in mqtt_connect()
290 if(packetlen > 268435455) in mqtt_connect()
292 packet = malloc(packetlen); in mqtt_connect()
295 memset(packet, 0, packetlen); in mqtt_connect()
339 result = mqtt_send(data, packet, packetlen); in mqtt_connect()
442 size_t packetlen; in mqtt_subscribe() local
453 packetlen = topiclen + 5; /* packetid + topic (has a two byte length field) in mqtt_subscribe()
455 n = mqtt_encode_len((char *)encodedsize, packetlen); in mqtt_subscribe()
456 packetlen += n + 1; /* add one for the control packet type byte */ in mqtt_subscribe()
458 packet = malloc(packetlen); in mqtt_subscribe()
473 result = mqtt_send(data, (char *)packet, packetlen); in mqtt_subscribe()