diff options
author | Simon Rettberg | 2015-10-23 12:38:53 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-10-23 12:38:53 +0200 |
commit | c12db031150b104e8811828fbfb2a97b270caafd (patch) | |
tree | 089f5bb40d5d7d0246d11fc6ca7214bf026815af /types.h | |
parent | Update Makefile (diff) | |
download | ldadp-c12db031150b104e8811828fbfb2a97b270caafd.tar.gz ldadp-c12db031150b104e8811828fbfb2a97b270caafd.tar.xz ldadp-c12db031150b104e8811828fbfb2a97b270caafd.zip |
Send search requests to server only after bind succeeded.
There are server implementations that ignore a search request if
it is sent in the same packet as the bind request, apparently
leaving it in some server side buffer. If another search request
is received by the server afterwards, it suddenly discovers the first
search request, handles it, and then proceeds to handle the second one.
So we now buffer all search requests we want to forward to the server
until we received a positive bind response from the server.
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -76,6 +76,8 @@ struct _epoll_server_t_ { size_t sbPos, sbFill, sbLen; SSL *ssl; // NULL if not encrypted char *sendBuffer; // Dynamically allocated, might or might not get huge + char bindBuffer[BINDLEN]; // Used for the bind request. We need this to prevent sending any requests before the server acknowledged the bind request + int bindLen; // Length of buffered bind request epoll_client_t *fixedClient; // If client performed explicit bind, this is the client belonging to this connection // Recv buffer (server's response) size_t rbPos; |