If signing starts successfully, don't just turn it off automatically if
[jra/samba/.git] / source3 / printing / print_generic.c
index 4d77b827bf6fba8cc53d62125ba80436f80f2c54..9e0ea85bb9adcb6b0ad46e1ccd844649a9943fe0 100644 (file)
@@ -18,6 +18,7 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include "includes.h"
 #include "printing.h"
 
 
@@ -164,7 +165,7 @@ static int generic_job_submit(int snum, struct printjob *pjob)
        pstrcpy(jobname, pjob->jobname);
        pstring_sub(jobname, "'", "_");
        slprintf(job_page_count, sizeof(job_page_count)-1, "%d", pjob->page_count);
-       slprintf(job_size, sizeof(job_size)-1, "%d", pjob->size);
+       slprintf(job_size, sizeof(job_size)-1, "%lu", (unsigned long)pjob->size);
 
        /* send it to the system spooler */
        ret = print_run_command(snum, 
@@ -214,6 +215,7 @@ static int generic_queue_get(int snum, print_queue_struct **q, print_status_stru
                queue = (print_queue_struct *)malloc(sizeof(print_queue_struct)*(numlines+1));
 
        if (queue) {
+               memset(queue, '\0', sizeof(print_queue_struct)*(numlines+1));
                for (i=0; i<numlines; i++) {
                        /* parse the line */
                        if (parse_lpq_entry(snum,qlines[i],