Author: gd Date: 2006-09-06 12:29:45 +0000 (Wed, 06 Sep 2006) New Revision: 18170
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18170 Log: Make sure to actually get the printing data before trying to publish it in AD. Guenther Modified: branches/SAMBA_3_0/source/utils/net_ads.c branches/SAMBA_3_0_23/source/utils/net_ads.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_ads.c =================================================================== --- branches/SAMBA_3_0/source/utils/net_ads.c 2006-09-06 12:29:05 UTC (rev 18169) +++ branches/SAMBA_3_0/source/utils/net_ads.c 2006-09-06 12:29:45 UTC (rev 18170) @@ -1719,8 +1719,11 @@ return -1; } - get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, - printername); + if (!W_ERROR_IS_OK(get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, + printername))) { + ads_destroy(&ads); + return -1; + } rc = ads_add_printer_entry(ads, prt_dn, mem_ctx, &mods); if (!ADS_ERR_OK(rc)) { Modified: branches/SAMBA_3_0_23/source/utils/net_ads.c =================================================================== --- branches/SAMBA_3_0_23/source/utils/net_ads.c 2006-09-06 12:29:05 UTC (rev 18169) +++ branches/SAMBA_3_0_23/source/utils/net_ads.c 2006-09-06 12:29:45 UTC (rev 18170) @@ -1525,8 +1525,11 @@ return -1; } - get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, - printername); + if (!W_ERROR_IS_OK(get_remote_printer_publishing_data(pipe_hnd, mem_ctx, &mods, + printername))) { + ads_destroy(&ads); + return -1; + } rc = ads_add_printer_entry(ads, prt_dn, mem_ctx, &mods); if (!ADS_ERR_OK(rc)) {
