messages_dgm: Use saved errno value
authorVolker Lendecke <vl@samba.org>
Thu, 7 Feb 2019 14:57:06 +0000 (15:57 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 5 Mar 2019 19:29:11 +0000 (19:29 +0000)
In this case this is just a cleanup, the value has just been set by
messaging_dgm_sendmsg. But as that already saves errno into a local
variable, use that.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13786

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit c27afc098398274abaed6dc9bef2019091c1b635)

source3/lib/messages_dgm.c

index 37eefeb0a4a7b8024272f161d4474241ae5aad61..cb0c17d6c247a075ae2878c84ffa2ac6771c8ffb 100644 (file)
@@ -553,7 +553,7 @@ static void messaging_dgm_out_threaded_job(void *private_data)
                if (state->sent != -1) {
                        return;
                }
-               if (errno != ENOBUFS) {
+               if (state->err != ENOBUFS) {
                        return;
                }