Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
0c3837fa
Commit
0c3837fa
authored
Jun 01, 2018
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deliver QoS message on receipt of Publish rather than Pubrel for MQTT5 #476
parent
f5fc716a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
MQTTProtocolClient.c
src/MQTTProtocolClient.c
+7
-1
No files found.
src/MQTTProtocolClient.c
View file @
0c3837fa
...
@@ -316,6 +316,11 @@ int MQTTProtocol_handlePublishes(void* pack, int sock)
...
@@ -316,6 +316,11 @@ int MQTTProtocol_handlePublishes(void* pack, int sock)
}
else
}
else
ListAppend
(
client
->
inboundMsgs
,
m
,
sizeof
(
Messages
)
+
len
);
ListAppend
(
client
->
inboundMsgs
,
m
,
sizeof
(
Messages
)
+
len
);
rc
=
MQTTPacket_send_pubrec
(
publish
->
msgId
,
&
client
->
net
,
client
->
clientID
);
rc
=
MQTTPacket_send_pubrec
(
publish
->
msgId
,
&
client
->
net
,
client
->
clientID
);
if
(
m
->
MQTTVersion
>=
MQTTVERSION_5
)
{
publish
->
payload
=
m
->
publish
->
payload
;
Protocol_processPublication
(
publish
,
client
);
}
publish
->
topic
=
NULL
;
publish
->
topic
=
NULL
;
}
}
MQTTPacket_freePublish
(
publish
);
MQTTPacket_freePublish
(
publish
);
...
@@ -470,7 +475,8 @@ int MQTTProtocol_handlePubrels(void* pack, int sock)
...
@@ -470,7 +475,8 @@ int MQTTProtocol_handlePubrels(void* pack, int sock)
publish
.
MQTTVersion
=
m
->
MQTTVersion
;
publish
.
MQTTVersion
=
m
->
MQTTVersion
;
if
(
publish
.
MQTTVersion
>=
MQTTVERSION_5
)
if
(
publish
.
MQTTVersion
>=
MQTTVERSION_5
)
publish
.
properties
=
m
->
properties
;
publish
.
properties
=
m
->
properties
;
Protocol_processPublication
(
&
publish
,
client
);
else
Protocol_processPublication
(
&
publish
,
client
);
/* only for 3.1.1 and lower */
#if !defined(NO_PERSISTENCE)
#if !defined(NO_PERSISTENCE)
rc
+=
MQTTPersistence_remove
(
client
,
PERSISTENCE_PUBLISH_RECEIVED
,
m
->
qos
,
pubrel
->
msgId
);
rc
+=
MQTTPersistence_remove
(
client
,
PERSISTENCE_PUBLISH_RECEIVED
,
m
->
qos
,
pubrel
->
msgId
);
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment