From: David Disseldorp Date: Wed, 29 May 2013 08:43:32 +0000 (+0200) Subject: printing: explicitly clear PUBLISHED attribute X-Git-Url: http://git.samba.org/?p=obnox%2Fsamba%2Fsamba-obnox.git;a=commitdiff_plain;h=f9b6b09e4e4e15257ce0a21caa46e26e119667d4 printing: explicitly clear PUBLISHED attribute Currently nt_printer_publish(DSPRINT_UNPUBLISH) flips (via xor) the info2->attributes PRINTER_ATTRIBUTE_PUBLISHED flag, rather than explicitly clearing it. Signed-off-by: David Disseldorp Reviewed-by: Andreas Schneider --- diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c index 3a2baf40f5e..86ea8f7a858 100644 --- a/source3/printing/nt_printing_ads.c +++ b/source3/printing/nt_printing_ads.c @@ -355,7 +355,7 @@ WERROR nt_printer_publish(TALLOC_CTX *mem_ctx, pinfo2->attributes |= PRINTER_ATTRIBUTE_PUBLISHED; break; case DSPRINT_UNPUBLISH: - pinfo2->attributes ^= PRINTER_ATTRIBUTE_PUBLISHED; + pinfo2->attributes &= (~PRINTER_ATTRIBUTE_PUBLISHED); break; default: win_rc = WERR_NOT_SUPPORTED;