[PATCH 1/4] printing: explicitly clear PUBLISHED attribute

David Disseldorp ddiss at samba.org
Wed May 29 02:43:32 MDT 2013


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 <ddiss at samba.org>
---
 source3/printing/nt_printing_ads.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c
index 3a2baf40..86ea8f7 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;
-- 
1.8.1.4



More information about the samba-technical mailing list