s3: don't replace the error message if already defined
authorMatthieu Patou <mat@matws.net>
Sun, 4 Mar 2012 05:20:59 +0000 (21:20 -0800)
committerMatthieu Patou <mat@samba.org>
Sun, 4 Mar 2012 09:13:24 +0000 (10:13 +0100)
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Mar  4 10:13:24 CET 2012 on sn-devel-104

source3/libnet/libnet_dssync.c

index c768226..a843106 100644 (file)
@@ -652,9 +652,11 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
                status = libnet_dssync_getncchanges(mem_ctx, ctx, level, &req,
                                                    &pnew_utdv);
                if (!NT_STATUS_IS_OK(status)) {
-                       ctx->error_message = talloc_asprintf(ctx,
-                               "Failed to call DsGetNCCHanges: %s",
-                               nt_errstr(status));
+                       if (!ctx->error_message) {
+                               ctx->error_message = talloc_asprintf(ctx,
+                                       "Failed to call DsGetNCCHanges: %s",
+                                       nt_errstr(status));
+                       }
                        goto out;
                }
        }