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
b3241963
Commit
b3241963
authored
Jul 02, 2012
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 384053 - version 1.0.0.7
parent
939b06f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
MQTTClient.c
src/MQTTClient.c
+11
-0
No files found.
src/MQTTClient.c
View file @
b3241963
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
*
*
* Contributors:
* Contributors:
* Ian Craggs - initial API and implementation and/or initial documentation
* Ian Craggs - initial API and implementation and/or initial documentation
* Ian Craggs - bug 384016 - segv setting will message
* Ian Craggs - bug 384053 - stop MQTTClient_receive on socket error
*******************************************************************************/
*******************************************************************************/
#include <stdlib.h>
#include <stdlib.h>
...
@@ -1357,6 +1359,15 @@ int MQTTClient_receive(MQTTClient handle, char** topicName, int* topicLen, MQTTC
...
@@ -1357,6 +1359,15 @@ int MQTTClient_receive(MQTTClient handle, char** topicName, int* topicLen, MQTTC
{
{
int
sock
=
0
;
int
sock
=
0
;
MQTTClient_cycle
(
&
sock
,
(
timeout
>
elapsed
)
?
timeout
-
elapsed
:
0L
,
&
rc
);
MQTTClient_cycle
(
&
sock
,
(
timeout
>
elapsed
)
?
timeout
-
elapsed
:
0L
,
&
rc
);
if
(
rc
==
SOCKET_ERROR
)
{
if
(
ListFindItem
(
handles
,
&
sock
,
clientSockCompare
)
&&
/* find client corresponding to socket */
(
MQTTClient
)(
handles
->
current
->
content
)
==
handle
)
break
;
/* there was an error on the socket we are interested in */
}
elapsed
=
MQTTClient_elapsed
(
start
);
elapsed
=
MQTTClient_elapsed
(
start
);
}
}
while
(
elapsed
<
timeout
&&
m
->
c
->
messageQueue
->
count
==
0
);
while
(
elapsed
<
timeout
&&
m
->
c
->
messageQueue
->
count
==
0
);
...
...
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