net/mosquitto: Patch QoS 2 in flight bug
authorKarl Palsson <karlp@remake.is>
Fri, 10 Apr 2015 14:37:48 +0000 (14:37 +0000)
committerKarl Palsson <karlp@remake.is>
Fri, 10 Apr 2015 14:37:48 +0000 (14:37 +0000)
Patched until new upstream release is available.
Patch sourced from upstream.

Signed-off-by: Karl Palsson <karlp@remake.is>
net/mosquitto/Makefile
net/mosquitto/patches/101-qos2-inflight.patch [new file with mode: 0644]

index 970a2356d85ce8fcd9e291f3d10ddf02f342dadf..5b015795c3af0f37634d16bc3aba5b7b60379ca4 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mosquitto
 PKG_VERSION:=1.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
 
diff --git a/net/mosquitto/patches/101-qos2-inflight.patch b/net/mosquitto/patches/101-qos2-inflight.patch
new file mode 100644 (file)
index 0000000..61706d3
--- /dev/null
@@ -0,0 +1,12 @@
+diff --git a/lib/mosquitto.c b/lib/mosquitto.c
+index bd9dbd3..7314248 100644
+--- a/lib/mosquitto.c
++++ b/lib/mosquitto.c
+@@ -594,7 +594,6 @@ int mosquitto_publish(struct mosquitto *mosq, int *mid, const char *topic, int p
+               pthread_mutex_lock(&mosq->out_message_mutex);
+               _mosquitto_message_queue(mosq, message, mosq_md_out);
+               if(mosq->max_inflight_messages == 0 || mosq->inflight_messages < mosq->max_inflight_messages){
+-                      mosq->inflight_messages++;
+                       if(qos == 1){
+                               message->state = mosq_ms_wait_for_puback;
+                       }else if(qos == 2){