summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2009-10-26 14:09:09 +0000
committerNanang Izzuddin <nanang@teluu.com>2009-10-26 14:09:09 +0000
commitdfe07c8f8d65d6045e1003c6c11dca75495f7b38 (patch)
tree3d8994e93b0690428608029d68a038426f3c02b3
parent058d9c4c6d15338e1d3b2e05ffea340eec565d9a (diff)
Misc fix (#951): Updated active socket to keep passing the packet pointer, instead of NULL, when connection is closed/error and no remainder data, as application, e.g: SSL sock, may need to have access on it.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2969 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjlib/src/pj/activesock.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pjlib/src/pj/activesock.c b/pjlib/src/pj/activesock.c
index 075141f6..33d957d3 100644
--- a/pjlib/src/pj/activesock.c
+++ b/pjlib/src/pj/activesock.c
@@ -458,8 +458,15 @@ static void ioqueue_on_read_complete(pj_ioqueue_key_t *key,
* connection.
* If there is no remainder data, set the packet to NULL.
*/
- ret = (*asock->cb.on_data_read)(asock, (r->size? r->pkt:NULL),
- r->size, status, &remainder);
+
+ /* Shouldn't set the packet to NULL, as there may be active
+ * socket user, such as SSL socket, that needs to have access
+ * to the read buffer packet.
+ */
+ //ret = (*asock->cb.on_data_read)(asock, (r->size? r->pkt:NULL),
+ // r->size, status, &remainder);
+ ret = (*asock->cb.on_data_read)(asock, r->pkt, r->size,
+ status, &remainder);
} else if (asock->read_type == TYPE_RECV_FROM &&
asock->cb.on_data_recvfrom)