r3018: handle STATUS_MORE_ENTRIES from socket_recv() in the messaging code
authorAndrew Tridgell <tridge@samba.org>
Sun, 17 Oct 2004 12:41:04 +0000 (12:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:58 +0000 (12:59 -0500)
(This used to be commit 13739b68d8357d5d330f12b851d0311feb81e545)

source4/lib/messaging/messaging.c

index f9caf5071c5a1e27d1418ede1ad461ec1ce218e5..7e87ea45df028936511fff8fd5fa65c4beb0920e 100644 (file)
@@ -125,6 +125,7 @@ static void messaging_recv_handler(struct event_context *ev, struct fd_event *fd
        if (rec->ndone < sizeof(rec->header)) {
                /* receive the header */
                DATA_BLOB blob;
+               blob.length = 0;
                status = socket_recv(rec->sock, rec, 
                                     &blob, sizeof(rec->header) - rec->ndone, 0);
                if (NT_STATUS_IS_ERR(status)) {
@@ -159,6 +160,7 @@ static void messaging_recv_handler(struct event_context *ev, struct fd_event *fd
            rec->ndone < sizeof(rec->header) + rec->header.length) {
                /* receive the body, if any */
                DATA_BLOB blob;
+               blob.length = 0;
                status = socket_recv(rec->sock, rec, 
                                     &blob, sizeof(rec->header) + rec->header.length - rec->ndone, 0);
                if (NT_STATUS_IS_ERR(status)) {