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
aca8a31e
Commit
aca8a31e
authored
Apr 11, 2017
by
Ian Craggs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into develop
parents
80dcde41
c168e806
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
MQTTClient.c
src/MQTTClient.c
+9
-14
No files found.
src/MQTTClient.c
View file @
aca8a31e
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
* Ian Craggs - make it clear that yield and receive are not intended for multi-threaded mode (bug 474748)
* Ian Craggs - make it clear that yield and receive are not intended for multi-threaded mode (bug 474748)
* Ian Craggs - SNI support, message queue unpersist bug
* Ian Craggs - SNI support, message queue unpersist bug
* Ian Craggs - binary will message support
* Ian Craggs - binary will message support
* Ian Craggs - waitforCompletion fix #240
*******************************************************************************/
*******************************************************************************/
/**
/**
...
@@ -1916,29 +1917,23 @@ int MQTTClient_waitForCompletion(MQTTClient handle, MQTTClient_deliveryToken mdt
...
@@ -1916,29 +1917,23 @@ int MQTTClient_waitForCompletion(MQTTClient handle, MQTTClient_deliveryToken mdt
rc
=
MQTTCLIENT_FAILURE
;
rc
=
MQTTCLIENT_FAILURE
;
goto
exit
;
goto
exit
;
}
}
if
(
m
->
c
->
connected
==
0
)
{
rc
=
MQTTCLIENT_DISCONNECTED
;
goto
exit
;
}
if
(
ListFindItem
(
m
->
c
->
outboundMsgs
,
&
mdt
,
messageIDCompare
)
==
NULL
)
{
rc
=
MQTTCLIENT_SUCCESS
;
/* well we couldn't find it */
goto
exit
;
}
elapsed
=
MQTTClient_elapsed
(
start
);
elapsed
=
MQTTClient_elapsed
(
start
);
while
(
elapsed
<
timeout
)
while
(
elapsed
<
timeout
)
{
{
Thread_unlock_mutex
(
mqttclient_mutex
);
if
(
m
->
c
->
connected
==
0
)
MQTTClient_yield
();
{
Thread_lock_mutex
(
mqttclient_mutex
);
rc
=
MQTTCLIENT_DISCONNECTED
;
goto
exit
;
}
if
(
ListFindItem
(
m
->
c
->
outboundMsgs
,
&
mdt
,
messageIDCompare
)
==
NULL
)
if
(
ListFindItem
(
m
->
c
->
outboundMsgs
,
&
mdt
,
messageIDCompare
)
==
NULL
)
{
{
rc
=
MQTTCLIENT_SUCCESS
;
/* well we couldn't find it */
rc
=
MQTTCLIENT_SUCCESS
;
/* well we couldn't find it */
goto
exit
;
goto
exit
;
}
}
Thread_unlock_mutex
(
mqttclient_mutex
);
MQTTClient_yield
();
Thread_lock_mutex
(
mqttclient_mutex
);
elapsed
=
MQTTClient_elapsed
(
start
);
elapsed
=
MQTTClient_elapsed
(
start
);
}
}
...
...
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