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
8ab74c01
Commit
8ab74c01
authored
Jul 19, 2017
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for issue #20
parent
53b949d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
SocketBuffer.c
src/SocketBuffer.c
+7
-6
No files found.
src/SocketBuffer.c
View file @
8ab74c01
...
@@ -3,17 +3,17 @@
...
@@ -3,17 +3,17 @@
*
*
* All rights reserved. This program and the accompanying materials
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
*
* The Eclipse Public License is available at
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
* http://www.eclipse.org/org/documents/edl-v10.php.
*
*
* Contributors:
* Contributors:
* Ian Craggs - initial API and implementation and/or initial documentation
* Ian Craggs - initial API and implementation and/or initial documentation
* Ian Craggs, Allan Stockdill-Mander - SSL updates
* Ian Craggs, Allan Stockdill-Mander - SSL updates
* Ian Craggs - fix for issue #244
* Ian Craggs - fix for issue #244
, issue #20
*******************************************************************************/
*******************************************************************************/
/**
/**
...
@@ -133,6 +133,7 @@ void SocketBuffer_terminate(void)
...
@@ -133,6 +133,7 @@ void SocketBuffer_terminate(void)
void
SocketBuffer_cleanup
(
int
socket
)
void
SocketBuffer_cleanup
(
int
socket
)
{
{
FUNC_ENTRY
;
FUNC_ENTRY
;
SocketBuffer_writeComplete
(
socket
);
/* clean up write buffers */
if
(
ListFindItem
(
queues
,
&
socket
,
socketcompare
))
if
(
ListFindItem
(
queues
,
&
socket
,
socketcompare
))
{
{
free
(((
socket_queue
*
)(
queues
->
current
->
content
))
->
buf
);
free
(((
socket_queue
*
)(
queues
->
current
->
content
))
->
buf
);
...
@@ -239,9 +240,9 @@ void SocketBuffer_interrupted(int socket, size_t actual_len)
...
@@ -239,9 +240,9 @@ void SocketBuffer_interrupted(int socket, size_t actual_len)
queue
=
def_queue
;
queue
=
def_queue
;
/* if SocketBuffer_queueChar() has not yet been called, then the socket number
/* if SocketBuffer_queueChar() has not yet been called, then the socket number
in def_queue will not have been set. Issue #244.
in def_queue will not have been set. Issue #244.
If actual_len == 0 then we may not need to do anything - I'll leave that
If actual_len == 0 then we may not need to do anything - I'll leave that
optimization for another time. */
optimization for another time. */
queue
->
socket
=
socket
;
queue
->
socket
=
socket
;
ListAppend
(
queues
,
def_queue
,
sizeof
(
socket_queue
)
+
def_queue
->
buflen
);
ListAppend
(
queues
,
def_queue
,
sizeof
(
socket_queue
)
+
def_queue
->
buflen
);
SocketBuffer_newDefQ
();
SocketBuffer_newDefQ
();
}
}
...
...
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