Index: systemv/cupsaddsmb.c =================================================================== --- systemv/cupsaddsmb.c (revision 6617) +++ systemv/cupsaddsmb.c (working copy) @@ -263,6 +263,9 @@ status = cupsAdminExportSamba(dest, ppdfile, SAMBAServer, SAMBAUser, SAMBAPassword, Verbosity ? stderr : NULL); + + if (!status && cupsLastError() == IPP_NOT_FOUND) + break; } unlink(ppdfile); Index: cups/adminutil.c =================================================================== --- cups/adminutil.c (revision 6617) +++ cups/adminutil.c (working copy) @@ -676,12 +676,15 @@ "are installed!")), sizeof(message)); - _cupsSetError(IPP_INTERNAL_ERROR, message); + _cupsSetError(IPP_NOT_FOUND, message); _cupsLangPrintf(logfile, "%s\n", message); } if (have_drivers == 0) + { + _cupsSetError(IPP_NOT_FOUND, message); return (0); + } /* * Finally, associate the drivers we just added with the queue...