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
0dd83c1d
Commit
0dd83c1d
authored
Jun 06, 2014
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return connack information for MQTT 3.1.1 in the async client
Bug: 436049
parent
2d2bd98c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
603 additions
and
3 deletions
+603
-3
Makefile
Makefile
+2
-2
MQTTAsync.c
src/MQTTAsync.c
+9
-1
MQTTAsync.h
src/MQTTAsync.h
+4
-0
test_mqtt4async.c
test/test_mqtt4async.c
+588
-0
No files found.
Makefile
View file @
0dd83c1d
...
...
@@ -59,13 +59,13 @@ SYNC_SAMPLES = ${addprefix ${blddir}/samples/,${SAMPLE_FILES_C}}
SAMPLE_FILES_A
=
stdoutsuba MQTTAsync_subscribe MQTTAsync_publish
ASYNC_SAMPLES
=
${
addprefix
${
blddir
}
/samples/,
${
SAMPLE_FILES_A
}}
TEST_FILES_C
=
test1 sync_client_test
TEST_FILES_C
=
test1 sync_client_test
test_mqtt4sync
SYNC_TESTS
=
${
addprefix
${
blddir
}
/test/,
${
TEST_FILES_C
}}
TEST_FILES_CS
=
test3
SYNC_SSL_TESTS
=
${
addprefix
${
blddir
}
/test/,
${
TEST_FILES_CS
}}
TEST_FILES_A
=
test4
TEST_FILES_A
=
test4
test_mqtt4async
ASYNC_TESTS
=
${
addprefix
${
blddir
}
/test/,
${
TEST_FILES_A
}}
TEST_FILES_AS
=
test5
...
...
src/MQTTAsync.c
View file @
0dd83c1d
...
...
@@ -1511,8 +1511,16 @@ thread_return_type WINAPI MQTTAsync_receiveThread(void* n)
MQTTAsync_freeConnect
(
m
->
connect
);
if
(
m
->
connect
.
onSuccess
)
{
MQTTAsync_successData
data
;
memset
(
&
data
,
'\0'
,
sizeof
(
data
));
Log
(
TRACE_MIN
,
-
1
,
"Calling connect success for client %s"
,
m
->
c
->
clientID
);
(
*
(
m
->
connect
.
onSuccess
))(
m
->
connect
.
context
,
NULL
);
if
(
m
->
connect
.
details
.
conn
.
serverURIcount
>
0
)
data
.
alt
.
connect
.
serverURI
=
m
->
connect
.
details
.
conn
.
serverURIs
[
m
->
connect
.
details
.
conn
.
currentURI
];
else
data
.
alt
.
connect
.
serverURI
=
m
->
serverURI
;
data
.
alt
.
connect
.
MQTTVersion
=
m
->
connect
.
details
.
conn
.
MQTTVersion
;
data
.
alt
.
connect
.
sessionPresent
=
((
Connack
*
)
pack
)
->
flags
.
bits
.
sessionPresent
;
(
*
(
m
->
connect
.
onSuccess
))(
m
->
connect
.
context
,
&
data
);
}
}
else
...
...
src/MQTTAsync.h
View file @
0dd83c1d
...
...
@@ -158,6 +158,10 @@
* MQTT version to connect with: 3.1.1
*/
#define MQTTVERSION_3_1_1 4
/**
* Bad return code from subscribe, as defined in the 3.1.1 specification
*/
#define MQTT_BAD_SUBSCRIBE 0x80
/**
* A handle representing an MQTT client. A valid client handle is available
...
...
test/test_mqtt4async.c
0 → 100644
View file @
0dd83c1d
This diff is collapsed.
Click to expand it.
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