Lines Matching refs:result

121   CURLcode result = CURLE_OK;  in mqtt_send()  local
124 result = Curl_xfer_send(data, buf, len, FALSE, &n); in mqtt_send()
125 if(result) in mqtt_send()
126 return result; in mqtt_send()
140 return result; in mqtt_send()
252 CURLcode result = CURLE_OK; in mqtt_connect() local
300 result = Curl_rand_alnum(data, (unsigned char *)&client_id[clen], in mqtt_connect()
306 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_connect()
323 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_connect()
333 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_connect()
338 if(!result) in mqtt_connect()
339 result = mqtt_send(data, packet, packetlen); in mqtt_connect()
346 return result; in mqtt_connect()
351 CURLcode result = CURLE_OK; in mqtt_disconnect() local
353 result = mqtt_send(data, (char *)"\xe0\x00", 2); in mqtt_disconnect()
356 return result; in mqtt_disconnect()
363 CURLcode result; in mqtt_recv_atleast() local
370 result = Curl_xfer_recv(data, (char *)readbuf, nbytes - rlen, &nread); in mqtt_recv_atleast()
371 if(result) in mqtt_recv_atleast()
372 return result; in mqtt_recv_atleast()
394 CURLcode result; in mqtt_verify_connack() local
397 result = mqtt_recv_atleast(data, MQTT_CONNACK_LEN); in mqtt_verify_connack()
398 if(result) in mqtt_verify_connack()
410 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_verify_connack()
415 return result; in mqtt_verify_connack()
422 CURLcode result = CURLE_URL_MALFORMAT; in mqtt_get_topic() local
424 result = Curl_urldecode(path + 1, 0, topic, topiclen, REJECT_NADA); in mqtt_get_topic()
425 if(!result && (*topiclen > 0xffff)) { in mqtt_get_topic()
427 result = CURLE_URL_MALFORMAT; in mqtt_get_topic()
433 return result; in mqtt_get_topic()
438 CURLcode result = CURLE_OK; in mqtt_subscribe() local
447 result = mqtt_get_topic(data, &topic, &topiclen); in mqtt_subscribe()
448 if(result) in mqtt_subscribe()
460 result = CURLE_OUT_OF_MEMORY; in mqtt_subscribe()
473 result = mqtt_send(data, (char *)packet, packetlen); in mqtt_subscribe()
478 return result; in mqtt_subscribe()
489 CURLcode result; in mqtt_verify_suback() local
492 result = mqtt_recv_atleast(data, MQTT_SUBACK_LEN); in mqtt_verify_suback()
493 if(result) in mqtt_verify_suback()
505 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_verify_suback()
510 return result; in mqtt_verify_suback()
515 CURLcode result; in mqtt_publish() local
536 result = mqtt_get_topic(data, &topic, &topiclen); in mqtt_publish()
537 if(result) in mqtt_publish()
546 result = CURLE_OUT_OF_MEMORY; in mqtt_publish()
560 result = mqtt_send(data, (char *)pkt, i); in mqtt_publish()
565 return result; in mqtt_publish()
623 CURLcode result = CURLE_OK; in mqtt_read_publish() local
634 result = mqtt_verify_suback(data); in mqtt_read_publish()
635 if(result) in mqtt_read_publish()
657 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_read_publish()
667 result = CURLE_FILESIZE_EXCEEDED; in mqtt_read_publish()
681 result = Curl_xfer_recv(data, buffer, rest, &nread); in mqtt_read_publish()
682 if(result) { in mqtt_read_publish()
683 if(CURLE_AGAIN == result) { in mqtt_read_publish()
690 result = CURLE_PARTIAL_FILE; in mqtt_read_publish()
695 result = Curl_client_write(data, CLIENTWRITE_BODY, buffer, nread); in mqtt_read_publish()
696 if(result) in mqtt_read_publish()
707 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_read_publish()
711 return result; in mqtt_read_publish()
716 CURLcode result = CURLE_OK; in mqtt_do() local
719 result = mqtt_connect(data); in mqtt_do()
720 if(result) { in mqtt_do()
721 failf(data, "Error %d sending MQTT CONNECT request", result); in mqtt_do()
722 return result; in mqtt_do()
741 CURLcode result = CURLE_OK; in mqtt_doing() local
753 result = mqtt_send(data, mq->sendleftovers, mq->nsend); in mqtt_doing()
755 if(result) in mqtt_doing()
756 return result; in mqtt_doing()
763 result = Curl_xfer_recv(data, (char *)&mq->firstbyte, 1, &nread); in mqtt_doing()
764 if(result) in mqtt_doing()
769 result = CURLE_RECV_ERROR; in mqtt_doing()
779 result = Curl_xfer_recv(data, (char *)&recvbyte, 1, &nread); in mqtt_doing()
780 if(result || !nread) in mqtt_doing()
785 if(!result && nread && (recvbyte & 0x80)) in mqtt_doing()
788 result = CURLE_WEIRD_SERVER_REPLY; in mqtt_doing()
789 if(result) in mqtt_doing()
805 result = mqtt_verify_connack(data); in mqtt_doing()
806 if(result) in mqtt_doing()
810 result = mqtt_publish(data); in mqtt_doing()
811 if(!result) { in mqtt_doing()
812 result = mqtt_disconnect(data); in mqtt_doing()
818 result = mqtt_subscribe(data); in mqtt_doing()
819 if(!result) { in mqtt_doing()
828 result = mqtt_read_publish(data, done); in mqtt_doing()
837 if(result == CURLE_AGAIN) in mqtt_doing()
838 result = CURLE_OK; in mqtt_doing()
839 return result; in mqtt_doing()