r14297: make sure we can go through the loop for than once
authorAndrew Tridgell <tridge@samba.org>
Mon, 13 Mar 2006 05:02:49 +0000 (05:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:09 +0000 (13:57 -0500)
(This used to be commit 6a84940bd3f310344641474dac984b262413943b)

source4/libcli/dgram/mailslot.c

index 33bca166ce93a2dca480c85986ed56268ca3b9e6..467289bcee3d7b634900293ee8f5c7769c6db884 100644 (file)
@@ -137,7 +137,9 @@ struct dgram_mailslot_handler *dgram_mailslot_temp(struct nbt_dgram_socket *dgms
                }
                dgmslot = dgram_mailslot_listen(dgmsock, name, handler, private);
                talloc_free(name);
-               return dgmslot;
+               if (dgmslot != NULL) {
+                       return dgmslot;
+               }
        }
        DEBUG(2,("Unable to create temporary mailslot from %s\n", mailslot_name));
        return NULL;