Fix wb_req_more(): Return 0 when done, read_pkt_send needs that
authorVolker Lendecke <vl@samba.org>
Fri, 12 Jun 2009 15:27:58 +0000 (17:27 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 12 Jun 2009 15:30:12 +0000 (17:30 +0200)
nsswitch/libwbclient/wb_reqtrans.c

index 5328423b15ffb5b9688dd750988153b3e87ba2f4..6dc429bb7d1f9ac6cba31decd316fae1eb9cfc96 100644 (file)
@@ -84,6 +84,11 @@ static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data)
                return sizeof(struct winbindd_request) - 4;
        }
 
+       if (buflen > sizeof(struct winbindd_request)) {
+               /* We've been here, we're done */
+               return 0;
+       }
+
        if ((state->max_extra_data != 0)
            && (req->extra_len > state->max_extra_data)) {
                DEBUG(3, ("Got request with %d bytes extra data on "