r4902: please note that cupsDoRequest() deletes the request* so don't call ippDelete...
authorGerald Carter <jerry@samba.org>
Fri, 21 Jan 2005 18:14:31 +0000 (18:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:55:07 +0000 (10:55 -0500)
(This used to be commit f65598b3b0dc99900d547eb67473cca5d371614f)

source3/printing/print_cups.c

index be47f16408866e61f9daac2f9f3992220546ba9c..90af10c3736a95833fd202c17eeac4ddc41cc777 100644 (file)
@@ -177,6 +177,8 @@ BOOL cups_cache_reload(void)
        *    requested-attributes
        */
 
+       request = ippNew();
+
        request->request.op.operation_id = CUPS_GET_CLASSES;
        request->request.op.request_id   = 1;
 
@@ -246,10 +248,6 @@ BOOL cups_cache_reload(void)
        ret = True;
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -342,10 +340,6 @@ static int cups_job_delete(int snum, struct printjob *pjob)
        }
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -438,10 +432,6 @@ static int cups_job_pause(int snum, struct printjob *pjob)
        }
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -534,10 +524,6 @@ static int cups_job_resume(int snum, struct printjob *pjob)
        }
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -668,10 +654,6 @@ static int cups_job_submit(int snum, struct printjob *pjob)
        /* else print_job_end will do it for us */
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -988,10 +970,6 @@ static int cups_queue_get(const char *printer_name,
        *q = queue;
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -1086,10 +1064,6 @@ static int cups_queue_pause(int snum)
        }
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);
 
@@ -1184,10 +1158,6 @@ static int cups_queue_resume(int snum)
        }
 
  out:
-
-       if (request)
-               ippDelete(request);
-
        if (response)
                ippDelete(response);