Don't emit processing library info in STATS_ONLY mode.

This commit is contained in:
Solomon Peachy 2021-05-05 21:14:59 -04:00
parent 48d34318d0
commit 2bc38801f4
5 changed files with 11 additions and 10 deletions

View File

@ -29,7 +29,7 @@
#include <signal.h> #include <signal.h>
#include <strings.h> /* For strncasecmp */ #include <strings.h> /* For strncasecmp */
#define BACKEND_VERSION "0.112" #define BACKEND_VERSION "0.113"
#ifndef CORRTABLE_PATH #ifndef CORRTABLE_PATH
#ifdef PACKAGE_DATA_DIR #ifdef PACKAGE_DATA_DIR
@ -57,6 +57,7 @@ int ncopies = 1;
int collate = 0; int collate = 0;
int test_mode = 0; int test_mode = 0;
int quiet = 0; int quiet = 0;
int stats_only = 0;
FILE *logger; FILE *logger;
const char *corrtable_path = CORRTABLE_PATH; const char *corrtable_path = CORRTABLE_PATH;
@ -1279,7 +1280,6 @@ int main (int argc, char **argv)
int found = -1; int found = -1;
int jobid = 0; int jobid = 0;
int stats_only = 0;
char *uri; char *uri;
char *type; char *type;
const char *fname = NULL; const char *fname = NULL;

View File

@ -294,6 +294,7 @@ extern int test_mode;
extern int quiet; extern int quiet;
extern const char *corrtable_path; extern const char *corrtable_path;
extern FILE *logger; extern FILE *logger;
extern int stats_only;
enum { enum {
TEST_MODE_NONE = 0, TEST_MODE_NONE = 0,

View File

@ -99,7 +99,7 @@ int mitsu_loadlib(struct mitsu_lib *lib, int type)
return CUPS_BACKEND_FAILED; return CUPS_BACKEND_FAILED;
} else { } else {
DEBUG("Image processing library successfully loaded\n"); DEBUG("Image processing library successfully loaded\n");
if (lib->DumpAnnounce) if (!stats_only && lib->DumpAnnounce)
lib->DumpAnnounce(logger); lib->DumpAnnounce(logger);
} }
} }

View File

@ -96,7 +96,7 @@ typedef int (*CPD30_DoConvertFN)(const struct mitsu_cpd30_data *table,
#define REQUIRED_LIB_APIVERSION 8 #define REQUIRED_LIB_APIVERSION 8
#define LIBMITSU_VER "0.08" #define LIBMITSU_VER "0.09"
/* Image processing library function prototypes */ /* Image processing library function prototypes */
#define LIB_NAME_RE "libMitsuD70ImageReProcess" DLL_SUFFIX #define LIB_NAME_RE "libMitsuD70ImageReProcess" DLL_SUFFIX

View File

@ -1263,7 +1263,7 @@ static int shinkos6145_attach(void *vctx, struct dyesub_connection *conn, uint8_
ctx->dev.error_codes = &s2245_error_codes; ctx->dev.error_codes = &s2245_error_codes;
#if defined(WITH_DYNAMIC) #if defined(WITH_DYNAMIC)
INFO("Attempting to load S2245 image processing library\n"); DEBUG("Attempting to load S2245 image processing library\n");
ctx->dl_handle = DL_OPEN(LIB2245_NAME); /* Try the Sinfonia one first */ ctx->dl_handle = DL_OPEN(LIB2245_NAME); /* Try the Sinfonia one first */
if (!ctx->dl_handle) if (!ctx->dl_handle)
ctx->dl_handle = DL_OPEN(LIB2245_NAME_RE); /* Then the RE one */ ctx->dl_handle = DL_OPEN(LIB2245_NAME_RE); /* Then the RE one */
@ -1277,8 +1277,8 @@ static int shinkos6145_attach(void *vctx, struct dyesub_connection *conn, uint8_
DL_CLOSE(ctx->dl_handle); DL_CLOSE(ctx->dl_handle);
ctx->dl_handle = NULL; ctx->dl_handle = NULL;
} else { } else {
INFO("Image processing library successfully loaded\n"); DEBUG("Image processing library successfully loaded\n");
if (ctx->DumpAnnounce) if (!stats_only && ctx->DumpAnnounce)
ctx->DumpAnnounce(logger); ctx->DumpAnnounce(logger);
} }
} }
@ -1290,7 +1290,7 @@ static int shinkos6145_attach(void *vctx, struct dyesub_connection *conn, uint8_
ctx->dev.error_codes = &s6145_error_codes; ctx->dev.error_codes = &s6145_error_codes;
#if defined(WITH_DYNAMIC) #if defined(WITH_DYNAMIC)
INFO("Attempting to load S6145 image processing library\n"); DEBUG("Attempting to load S6145 image processing library\n");
ctx->dl_handle = DL_OPEN(LIB6145_NAME); /* Try the Sinfonia one first */ ctx->dl_handle = DL_OPEN(LIB6145_NAME); /* Try the Sinfonia one first */
if (!ctx->dl_handle) if (!ctx->dl_handle)
ctx->dl_handle = DL_OPEN(LIB6145_NAME_RE); /* Then the RE one */ ctx->dl_handle = DL_OPEN(LIB6145_NAME_RE); /* Then the RE one */
@ -1303,8 +1303,8 @@ static int shinkos6145_attach(void *vctx, struct dyesub_connection *conn, uint8_
DL_CLOSE(ctx->dl_handle); DL_CLOSE(ctx->dl_handle);
ctx->dl_handle = NULL; ctx->dl_handle = NULL;
} else { } else {
INFO("Image processing library successfully loaded\n"); DEBUG("Image processing library successfully loaded\n");
if (ctx->DumpAnnounce) if (!stats_only && ctx->DumpAnnounce)
ctx->DumpAnnounce(logger); ctx->DumpAnnounce(logger);
} }
} }