~ubuntu-branches/ubuntu/saucy/hplip/saucy-proposed

« back to all changes in this revision

Viewing changes to scan/sane/soap.c

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-26 11:20:39 UTC
  • mfrom: (1.5.6) (31.1.3 precise)
  • Revision ID: package-import@ubuntu.com-20120526112039-bevxczegxnbyr5m7
Tags: 3.12.4-1
* New upstream release
* Switch to source/format 3.0 (quilt) - drop dpatch
* Refreshed debian/patches
* dh_autoreconf debian/autogen.sh & set local-options single-debian-patch
* Update to debian/compat -> 9
* Fix "hardened build flags" patch from Moritz - thanks (Closes: #667828)
* Fix "duplex descriptor uninitialized" patch from Matej (Closes: #583273)
* Fix "please migrate to kde-runtime" patch from Pino (Closes: #666544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
   /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */ 
72
72
   if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
73
73
   {
74
 
      BUG("unable to load restricted library: %s\n", dlerror());
75
 
      goto bugout;
 
74
      if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
 
75
      {
 
76
         BUG("unable to load restricted library: %s\n", dlerror());
 
77
         goto bugout;
 
78
      }
76
79
   } 
77
80
 
78
81
   /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */ 
840
843
   int stat, ret;
841
844
 
842
845
   DBG8("sane_hpaio_start()\n");
843
 
 
 
846
   ps->user_cancel = 0;
844
847
   if (set_extents(ps))
845
848
   {
846
849
      BUG("invalid extents: tlx=%d brx=%d tly=%d bry=%d minwidth=%d minheight%d maxwidth=%d maxheight=%d\n",
855
858
      stat = SANE_STATUS_IO_ERROR;
856
859
      goto bugout;
857
860
   }
858
 
 
 
861
   SendScanEvent(ps->uri, EVENT_START_SCAN_JOB);
859
862
   memset(xforms, 0, sizeof(xforms));    
860
863
 
861
864
   /* Setup image-processing pipeline for xform. */
977
980
   int ret, stat=SANE_STATUS_IO_ERROR;
978
981
 
979
982
   DBG8("sane_hpaio_read() handle=%p data=%p maxLength=%d\n", (void *)handle, data, maxLength);
980
 
 
 
983
   if(ps->user_cancel)
 
984
   {
 
985
     DBG8("soap_read() EVENT_SCAN_CANCEL****uri=%s\n", ps->uri);
 
986
     SendScanEvent(ps->uri, EVENT_SCAN_CANCEL);
 
987
     return SANE_STATUS_CANCELLED;
 
988
   }
 
989
   
981
990
   ret = get_ip_data(ps, data, maxLength, length);
982
991
 
983
992
   if(ret & (IP_INPUT_ERROR | IP_FATAL_ERROR))
987
996
   }
988
997
 
989
998
   if (ret & IP_DONE)
 
999
   {
990
1000
      stat = SANE_STATUS_EOF;
 
1001
      SendScanEvent (ps->uri, EVENT_END_SCAN_JOB);
 
1002
   }
991
1003
   else
992
1004
      stat = SANE_STATUS_GOOD;
993
1005
 
1018
1030
    * Sane_cancel is always called at the end of the scan job. Note that on a multiple page scan job 
1019
1031
    * sane_cancel is called only once.
1020
1032
    */
1021
 
 
 
1033
   ps->user_cancel = 1;
1022
1034
   if (ps->ip_handle)
1023
1035
   {
1024
1036
      ipClose(ps->ip_handle);