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
d5b49f7e
Commit
d5b49f7e
authored
Mar 14, 2014
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add remaining interops tests to sync_client_test.c
parent
86dcb196
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
405 additions
and
225 deletions
+405
-225
MQTTClient.c
src/MQTTClient.c
+8
-0
MQTTPacket.c
src/MQTTPacket.c
+4
-4
MQTTPacket.h
src/MQTTPacket.h
+1
-1
utf-8.c
src/utf-8.c
+6
-0
sync_client_test.c
test/sync_client_test.c
+386
-220
No files found.
src/MQTTClient.c
View file @
d5b49f7e
...
...
@@ -1246,6 +1246,14 @@ int MQTTClient_subscribeMany(MQTTClient handle, int count, char** topic, int* qo
Thread_lock_mutex
(
mqttclient_mutex
);
if
(
pack
!=
NULL
)
{
Suback
*
sub
=
(
Suback
*
)
pack
;
ListElement
*
current
=
NULL
;
i
=
0
;
while
(
ListNextElement
(
sub
->
qoss
,
&
current
))
{
int
*
reqqos
=
(
int
*
)(
current
->
content
);
qos
[
i
++
]
=
*
reqqos
;
}
rc
=
MQTTProtocol_handleSubacks
(
pack
,
m
->
c
->
net
.
socket
);
m
->
pack
=
NULL
;
}
...
...
src/MQTTPacket.c
View file @
d5b49f7e
...
...
@@ -384,9 +384,9 @@ char* readUTF(char** pptr, char* enddata)
* @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
* @return the character read
*/
char
readChar
(
char
**
pptr
)
unsigned
char
readChar
(
char
**
pptr
)
{
char
c
=
**
pptr
;
unsigned
char
c
=
**
pptr
;
(
*
pptr
)
++
;
return
c
;
}
...
...
@@ -533,8 +533,8 @@ int MQTTPacket_send_ack(int type, int msgid, int dup, networkHandles *net)
header
.
byte
=
0
;
header
.
bits
.
type
=
type
;
header
.
bits
.
dup
=
dup
;
if
(
type
==
PUBREL
)
header
.
bits
.
qos
=
1
;
if
(
type
==
PUBREL
)
header
.
bits
.
qos
=
1
;
writeInt
(
&
ptr
,
msgid
);
if
((
rc
=
MQTTPacket_send
(
net
,
header
,
buf
,
2
,
1
))
!=
TCPSOCKET_INTERRUPTED
)
free
(
buf
);
...
...
src/MQTTPacket.h
View file @
d5b49f7e
...
...
@@ -202,7 +202,7 @@ int MQTTPacket_encode(char* buf, int length);
int
MQTTPacket_decode
(
networkHandles
*
net
,
int
*
value
);
int
readInt
(
char
**
pptr
);
char
*
readUTF
(
char
**
pptr
,
char
*
enddata
);
char
readChar
(
char
**
pptr
);
unsigned
char
readChar
(
char
**
pptr
);
void
writeChar
(
char
**
pptr
,
char
c
);
void
writeInt
(
char
**
pptr
,
int
anInt
);
void
writeUTF
(
char
**
pptr
,
char
*
string
);
...
...
src/utf-8.c
View file @
d5b49f7e
...
...
@@ -127,11 +127,17 @@ int UTF8_validate(int len, char* data)
int
rc
=
0
;
FUNC_ENTRY
;
if
(
len
==
0
)
{
rc
=
1
;
goto
exit
;
}
curdata
=
UTF8_char_validate
(
len
,
data
);
while
(
curdata
&&
(
curdata
<
data
+
len
))
curdata
=
UTF8_char_validate
(
len
,
curdata
);
rc
=
curdata
!=
NULL
;
exit:
FUNC_EXIT_RC
(
rc
);
return
rc
;
}
...
...
test/sync_client_test.c
View file @
d5b49f7e
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