~ubuntu-branches/debian/sid/hplip/sid

« back to all changes in this revision

Viewing changes to prnt/hpijs/hpijsfax.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2013-05-05 21:09:24 UTC
  • mfrom: (1.7.1) (20.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20130505210924-cfpl0sn36p5sr436
Tags: 3.13.4-1
* New upstream release
* Removed "KDE from long description." (Closes: #706269)
* Clarified "[hpijs] short description" (Closes: #706057)

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#endif
54
54
#include "hpip.h"
55
55
#include "hpijsfax.h"
 
56
#include "utils.h"
56
57
 
57
58
int hpijsfax_status_cb (void *status_cb_data, IjsServerCtx *ctx, IjsJobId job_id)
58
59
{
269
270
        IP_XFORM_SPEC   xForm[3];
270
271
        IP_IMAGE_TRAITS traits;
271
272
        IP_HANDLE               hJob;
 
273
         FILE *pFilePtrFax;
272
274
 
273
 
        char                                    hpFileName[] = "/tmp/hplipfaxXXXXXX";
 
275
        char                                    hpFileName[64]; 
274
276
        int                                     fdFax = -1;
275
277
        BYTE                                    szFileHeader[68];
276
278
        BYTE                                    szPageHeader[64];
277
279
        BYTE                                    *p;
278
280
        unsigned        int                     uiPageNum = 0;
279
281
 
 
282
        snprintf(hpFileName,sizeof(hpFileName),"%s/hplipfaxXXXXXX","/var/log/hp/tmp");
 
283
 
 
284
 
280
285
        pFaxStruct = new HPIJSFax ();
281
286
 
282
287
        if (pFaxStruct == NULL)
313
318
                    pFaxStruct->SetFirstRaster (0);
314
319
                        if (fdFax == -1)
315
320
                        {
316
 
                                fdFax = mkstemp (hpFileName);
 
321
//                              fdFax = mkstemp (hpFileName);
 
322
                                fdFax = createTempFile(hpFileName, &pFilePtrFax);
317
323
                                if (fdFax < 0)
318
324
                                {
319
325
                                        BUG ("Unable to open Fax output file - %s for writing\n", hpFileName);