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
0e6c4e16
Commit
0e6c4e16
authored
Aug 26, 2014
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better SSL socket connect handling
parent
033e682c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
MQTTAsync.c
src/MQTTAsync.c
+4
-1
SSLSocket.c
src/SSLSocket.c
+2
-0
No files found.
src/MQTTAsync.c
View file @
0e6c4e16
...
@@ -2424,8 +2424,11 @@ int MQTTAsync_connecting(MQTTAsyncs* m)
...
@@ -2424,8 +2424,11 @@ int MQTTAsync_connecting(MQTTAsyncs* m)
if
((
rc
=
SSL_set_session
(
m
->
c
->
net
.
ssl
,
m
->
c
->
session
))
!=
1
)
if
((
rc
=
SSL_set_session
(
m
->
c
->
net
.
ssl
,
m
->
c
->
session
))
!=
1
)
Log
(
TRACE_MIN
,
-
1
,
"Failed to set SSL session with stored data, non critical"
);
Log
(
TRACE_MIN
,
-
1
,
"Failed to set SSL session with stored data, non critical"
);
rc
=
SSLSocket_connect
(
m
->
c
->
net
.
ssl
,
m
->
c
->
net
.
socket
);
rc
=
SSLSocket_connect
(
m
->
c
->
net
.
ssl
,
m
->
c
->
net
.
socket
);
if
(
rc
==
-
1
)
if
(
rc
==
TCPSOCKET_INTERRUPTED
)
{
rc
=
MQTTCLIENT_SUCCESS
;
/* the connect is still in progress */
m
->
c
->
connect_state
=
2
;
m
->
c
->
connect_state
=
2
;
}
else
if
(
rc
==
SSL_FATAL
)
else
if
(
rc
==
SSL_FATAL
)
{
{
rc
=
SOCKET_ERROR
;
rc
=
SOCKET_ERROR
;
...
...
src/SSLSocket.c
View file @
0e6c4e16
...
@@ -573,6 +573,8 @@ int SSLSocket_connect(SSL* ssl, int sock)
...
@@ -573,6 +573,8 @@ int SSLSocket_connect(SSL* ssl, int sock)
error
=
SSLSocket_error
(
"SSL_connect"
,
ssl
,
sock
,
rc
);
error
=
SSLSocket_error
(
"SSL_connect"
,
ssl
,
sock
,
rc
);
if
(
error
==
SSL_FATAL
)
if
(
error
==
SSL_FATAL
)
rc
=
error
;
rc
=
error
;
if
(
error
==
SSL_ERROR_WANT_READ
||
error
==
SSL_ERROR_WANT_WRITE
)
rc
=
TCPSOCKET_INTERRUPTED
;
}
}
FUNC_EXIT_RC
(
rc
);
FUNC_EXIT_RC
(
rc
);
...
...
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