components/hplip/patches/02_HPCupsFilter.cpp.patch
author Laszlo Peter <laszlo.peter@oracle.com>
Wed, 13 Jul 2016 14:48:26 -0700
changeset 6410 3ae42b2b5dad
parent 4923 b9e3f6b6a101
child 7345 cf697ee09e57
permissions -rw-r--r--
PSARC/2016/355 cachetools - Extensible memoizing collections and decorators PSARC/2016/356 funcsigs - Backport of the PEP 362 function signature features from Python 3.3's inspect module PSARC/2016/358 pika-pool - pika connection pooling library PSARC/2016/362 pika - Python AMQP client library PSARC/2016/402 appdirs - Platform-specific application directories Python module PSARC/2016/430 requestsexceptions - find the path to exceptions in the requests library PSARC/2016/431 python-editor - Programmatically open an editor, capture the result PSARC/2016/432 rJSmin - Javascript Minifier PSARC/2016/433 unicodecsv - CSV python module with unicode support 22996389 The appdirs module should be added to Userland 22960798 The Python module cachetools should be added to Userland 22961272 The Python module funcsigs should be added to Userland 23528657 The Python pika module should be added to Userland 23520215 The Python pika-pool module should be added to Userland 23757060 The python-editor module should be added to Userland 23757078 The rJSmin python modules should be added to Userland 23757069 The requestsexceptions python module should be added to Userland 23757082 The unicodecsv python module should be added to Userland 23747719 update Babel to 2.3.4 23206271 Upgrade cffi to 1.5.2 23206346 Upgrade enum to 1.1.6 23206525 Upgrade filechunkio 1.6 23206568 Upgrade formencode to 1.3.0 23206878 Upgrade librabbitmq to 1.6.1 23206931 Upgrade markdown to 2.6.6 23206993 Upgrade markupsafe to 0.23 23119312 Upgrade pygments to 2.1.3 23207180 Upgrade pyparsing to 2.1.4 23207199 Upgrade pyrabbit to 1.1.0 23207670 Upgrade pytz to 2016.4 23209215 Upgrade rfc3986 to 0.3.1 23210233 Upgrade waitress to 0.9.0 23210235 Upgrade webtest to 2.0.21 23760103 Incorrect version of pymemcache delivered

source: in-house
SPRO C++ changes.

--- a/prnt/hpcups/HPCupsFilter.cpp	2014-04-04 03:39:07.000000000 -0700
+++ b/prnt/hpcups/HPCupsFilter.cpp	2014-04-11 12:24:59.109386019 -0700
@@ -37,6 +37,8 @@
 #include <time.h>
 #include "utils.h"
 
+extern "C" int getdomainname(char*, int);
+
 #define HP_FILE_VERSION_STR    "03.09.08.0"
 
 static HPCupsFilter    filter;
@@ -597,7 +599,7 @@
     char hpPreProcessedRasterFile[MAX_FILE_PATH_LEN]; //temp file needed to store raster data with swaped pages.
 
 
-    sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+    snprintf(hpPreProcessedRasterFile, sizeof(hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX", CUPS_TMP_DIR, m_JA.user_name);
 
 
     while (cupsRasterReadHeader2(cups_raster, &cups_header))
--- a/prnt/hpcups/CommonDefinitions.h	2014-04-04 03:39:07.000000000 -0700
+++ b/prnt/hpcups/CommonDefinitions.h	2014-04-11 12:03:54.025798599 -0700
@@ -305,7 +305,7 @@
 /* 0x68 */    ZJI_BITMAP_PIXELS,
 /* 0x69 */    ZJI_BITMAP_LINES,
 /* 0x6A */    ZJI_BITMAP_BPP,
-/* 0x6B */    ZJI_BITMAP_STRIDE,
+/* 0x6B */    ZJI_BITMAP_STRIDE
 
 } ZJ_ITEM;
 
--- a/io/hpmud/hpmud.h	2014-04-04 03:42:17.000000000 -0700
+++ b/io/hpmud/hpmud.h	2014-04-11 12:12:13.756537138 -0700
@@ -46,7 +46,7 @@
    HPMUD_R_INVALID_TIMEOUT = 47,
    HPMUD_R_DATFILE_ERROR = 48,
    HPMUD_R_IO_TIMEOUT = 49,
-   HPMUD_R_INVALID_MDNS = 50,
+   HPMUD_R_INVALID_MDNS = 50
 };
 
 enum HPMUD_IO_MODE
@@ -57,7 +57,7 @@
    HPMUD_DOT4_PHOENIX_MODE=4,  /* (ie: clj2550, clj2840, lj3050, lj3055, clj4730mfp) */
    HPMUD_DOT4_BRIDGE_MODE=5,  /* (ie: clj2500) not USB compatable, use HPMUD_RAW_MODE, tested on F10 12/10/08 DES */
    HPMUD_MLC_GUSHER_MODE=6,   /* most new devices */
-   HPMUD_MLC_MISER_MODE=7,  /* old stuff */
+   HPMUD_MLC_MISER_MODE=7  /* old stuff */
 };
 
 enum HPMUD_BUS_ID
@@ -78,7 +78,7 @@
    HPMUD_SCANTYPE_SOAPHT = 5,   /* HorseThief (ie: ljm1522) */
    HPMUD_SCANTYPE_SCL_DUPLEX = 6,
    HPMUD_SCANTYPE_LEDM = 7,
-   HPMUD_SCANTYPE_MARVELL2 = 8,     /* (Tsunami lj 1212  and series) */
+   HPMUD_SCANTYPE_MARVELL2 = 8     /* (Tsunami lj 1212  and series) */
 };
 
 enum HPMUD_SCANSRC
@@ -86,7 +86,7 @@
    HPMUD_SCANSRC_NA = 0,
    HPMUD_SCANSRC_FLATBED = 0x1,
    HPMUD_SCANSRC_ADF= 0x2,
-   HPMUD_SCANSRC_CAMERA = 0x4,
+   HPMUD_SCANSRC_CAMERA = 0x4
 };
 
 enum HPMUD_STATUSTYPE
@@ -97,21 +97,21 @@
    HPMUD_STATUSTYPE_PML = 3,      /* laserjet pml */
    HPMUD_STATUSTYPE_EWS = 6,      /* laserjet hp ews */
    HPMUD_STATUSTYPE_PJL = 8,      /* laserjet pjl */
-   HPMUD_STATUSTYPE_PJLPML = 9,   /* laserjet pjl and pml */
+   HPMUD_STATUSTYPE_PJLPML = 9    /* laserjet pjl and pml */
 };
 
 enum HPMUD_SUPPORT_TYPE
 {
    HPMUD_SUPPORT_TYPE_NONE = 0,   /* not supported */
    HPMUD_SUPPORT_TYPE_HPIJS = 1,  /* supported by hpijs only */
-   HPMUD_SUPPORT_TYPE_HPLIP = 2,   /* supported by hpijs and "hp" backend */
+   HPMUD_SUPPORT_TYPE_HPLIP = 2   /* supported by hpijs and "hp" backend */
 };
 
 enum HPMUD_PLUGIN_TYPE
 {
    HPMUD_PLUGIN_TYPE_NONE = 0,
    HPMUD_PLUGIN_TYPE_REQUIRED = 1,
-   HPMUD_PLUGIN_TYPE_OPTIONAL = 2,
+   HPMUD_PLUGIN_TYPE_OPTIONAL = 2
 };
 
 
--- a/common/utils.h	2014-04-04 03:42:15.000000000 -0700
+++ b/common/utils.h	2014-04-11 12:49:00.832008556 -0700
@@ -22,7 +22,8 @@
 #define SCAN_PLUGIN_SOAPHT "bb_soapht.so"
 
 #define HPLIP_PLUGIN_STATE  "/var/lib/hp/hplip.state"
-#define CUPS_TMP_DIR   getenv("TMPDIR") ? : getenv("HOME") ?:"/tmp"
+//#define CUPS_TMP_DIR   getenv("TMPDIR") ? : getenv("HOME") ?:"/tmp"
+#define CUPS_TMP_DIR   "/tmp"
 
 enum UTILS_CONF_RESULT
 {
@@ -30,7 +31,7 @@
    UTILS_CONF_FILE_NOT_FOUND,       // =1,
    UTILS_CONF_SECTION_NOT_FOUND,    // =2,
    UTILS_CONF_KEY_NOT_FOUND,        // =3,
-   UTILS_CONF_DATFILE_ERROR,        // = 4,
+   UTILS_CONF_DATFILE_ERROR         // = 4,
 };
 
 
@@ -38,14 +39,14 @@
 {
    UTILS_PLUGIN_STATUS_OK = 0,
    UTILS_PLUGIN_STATUS_MISMATCH,        // = 1,
-   UTILS_PLUGIN_STATUS_NOT_INSTALLED,   // = 2,
+   UTILS_PLUGIN_STATUS_NOT_INSTALLED    // = 2,
 };
 
 enum UTILS_PLUGIN_LIBRARY_TYPE
 {
    UTILS_PRINT_PLUGIN_LIBRARY = 0,          // = 0,
    UTILS_SCAN_PLUGIN_LIBRARY,           // =1,
-   UTILS_FAX_PLUGIN_LIBRARY,            // =2,
+   UTILS_FAX_PLUGIN_LIBRARY//,            // =2,
 //   UTILS_GENERAL_PLUGIN_LIBRARY         //=4,     // Future use.. 
 };