Bug 87 - after SSL_ERROR_WANT_WRITE, SSL_write must be called with identical arguments
Summary: after SSL_ERROR_WANT_WRITE, SSL_write must be called with identical arguments
Status: NEW
Alias: None
Product: resiprocate
Classification: Unclassified
Component: stack (libresip) (show other bugs)
Version: unspecified
Hardware: All All
: P1 major
Assignee: Owner of all unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 17:33 CDT by Daniel Pocock
Modified: 2015-03-22 17:33 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pocock 2015-03-22 17:33:03 CDT
If SSL_write returns with error code SSL_ERROR_WANT_WRITE, the next call to SSL_write must use identical arguments (identical pointer to buffer, identical buffer size).

The Connection logic doesn't currently adhere to this.

SSL_ERROR_WANT_WRITE doesn't occur so frequently and even when it does, there is a probability that the arguments will be the same anyway.  But in those cases where the connection is very busy and more SIP messages are in the buffer, the SSL_write will fail and the connection may be dropped.

The error may look like this:

error:1409F07F:SSL routines:SSL3_WRITE_PENDING: bad write retry