The branch, master has been updated
       via  5686a6d91a2e1669dd9d00ba1faf493b0bb5ee90 (commit)
       via  ddd3da8ab7b82a59b84338fb4814981d5ae2f8e4 (commit)
      from  9569d979de43970399f33645323e9091338084f6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5686a6d91a2e1669dd9d00ba1faf493b0bb5ee90
Author: Volker Lendecke <[email protected]>
Date:   Sat Feb 28 12:20:56 2009 +0100

    Fix async reading winbindd_response

commit ddd3da8ab7b82a59b84338fb4814981d5ae2f8e4
Author: Volker Lendecke <[email protected]>
Date:   Sat Feb 28 12:19:24 2009 +0100

    Simplify async_connect_send slightly

-----------------------------------------------------------------------

Summary of changes:
 lib/async_req/async_sock.c |   15 ++++++---------
 source3/lib/wb_reqtrans.c  |    2 +-
 2 files changed, 7 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 40e7bca..1f48697 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -268,8 +268,8 @@ struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx,
 
        state->result = connect(fd, address, address_len);
        if (state->result == 0) {
-               errno = 0;
-               goto post_errno;
+               tevent_req_done(result);
+               goto done;
        }
 
        /**
@@ -284,25 +284,22 @@ struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx,
              errno == EISCONN ||
 #endif
              errno == EAGAIN || errno == EINTR)) {
+               state->sys_errno = errno;
                goto post_errno;
        }
 
        fde = tevent_add_fd(ev, state, fd, TEVENT_FD_READ | TEVENT_FD_WRITE,
                           async_connect_connected, result);
        if (fde == NULL) {
-               errno = ENOMEM;
+               state->sys_errno = ENOMEM;
                goto post_errno;
        }
        return result;
 
  post_errno:
-       state->sys_errno = errno;
+       tevent_req_error(result, state->sys_errno);
+ done:
        fcntl(fd, F_SETFL, state->old_sockflags);
-       if (state->sys_errno == 0) {
-               tevent_req_done(result);
-       } else {
-               tevent_req_error(result, state->sys_errno);
-       }
        return tevent_req_post(result, ev);
 }
 
diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c
index a5adf8f..65906dc 100644
--- a/source3/lib/wb_reqtrans.c
+++ b/source3/lib/wb_reqtrans.c
@@ -288,7 +288,7 @@ static ssize_t wb_resp_more(uint8_t *buf, size_t buflen, 
void *private_data)
                        return -1;
                }
        }
-       return resp->length - 4;
+       return resp->length - buflen;
 }
 
 static void wb_resp_read_done(struct tevent_req *subreq)


-- 
Samba Shared Repository

Reply via email to