Skip to content

Commit

Permalink
Temporary workaround for ticket #11. Use QOS 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik Markovic committed Sep 28, 2021
1 parent ed6d49b commit 1243b06
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions iotconnect-sdk/src/iotconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <cJSON.h>

#include <zephyr.h>
#include <iotconnect_socket_https.h>
#include <net/mqtt.h> // only for MQTT_QOS_* defines

#include "iotconnect_socket_https.h"

#include "nrf_cert_store.h"
#include "iotconnect_socket_https.h"
Expand All @@ -24,8 +25,9 @@


/* Buffers for MQTT client. */
IotclDiscoveryResponse *discovery_response = NULL;
IotclSyncResponse *sync_response = NULL;

static IotclDiscoveryResponse *discovery_response = NULL;
static IotclSyncResponse *sync_response = NULL;
struct mqtt_client client;

static IotconnectClientConfig config = {0};
Expand Down Expand Up @@ -201,7 +203,7 @@ void iotconnect_sdk_disconnect() {
}

void iotconnect_sdk_send_packet(const char *data) {
if (0 != iotc_nrf_mqtt_publish(&client, sync_response->broker.pub_topic, 1, data, strlen(data))) {
if (0 != iotc_nrf_mqtt_publish(&client, sync_response->broker.pub_topic, MQTT_QOS_0_AT_MOST_ONCE, data, strlen(data))) {
printk("\n\t Device_Attributes_Data Publish failure");
}
}
Expand Down

0 comments on commit 1243b06

Please sign in to comment.