all: use BACKEND_CUPS_RETRY_CURRENT for memory allocation failures.
This commit is contained in:
parent
0cfd77ce12
commit
c824c549fb
|
@ -723,7 +723,7 @@ static int canonselphy_read_parse(void *vctx, int data_fd)
|
|||
}
|
||||
if (!ctx->printer) {
|
||||
ERROR("Error mapping printjob to printer type!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_CANCEL;
|
||||
}
|
||||
|
||||
INFO("%sFile intended for a '%s' printer\n", ctx->bw_mode? "B/W " : "", ctx->printer->model);
|
||||
|
@ -773,7 +773,7 @@ static int canonselphy_read_parse(void *vctx, int data_fd)
|
|||
if (!ctx->plane_y || !ctx->plane_m || !ctx->plane_c || !ctx->header ||
|
||||
(ctx->printer->foot_length && !ctx->footer)) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Move over chunks already read in */
|
||||
|
|
|
@ -256,7 +256,7 @@ static int selphyneo_read_parse(void *vctx, int data_fd)
|
|||
ctx->databuf = malloc(remain + sizeof(hdr));
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Store the read-in header */
|
||||
|
|
|
@ -359,7 +359,7 @@ static int cw01_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(remain);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_CANCEL;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
j = 0;
|
||||
|
|
|
@ -897,7 +897,7 @@ static int dnpds40_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(MAX_PRINTJOB_LEN);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_CANCEL;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Clear everything out */
|
||||
|
|
|
@ -376,7 +376,7 @@ static int kodak1400_read_parse(void *vctx, int data_fd) {
|
|||
ctx->plane_b = malloc(ctx->hdr.planesize);
|
||||
if (!ctx->plane_r || !ctx->plane_g || !ctx->plane_b) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
for (i = 0 ; i < ctx->hdr.rows ; i++) {
|
||||
int j;
|
||||
|
|
|
@ -311,7 +311,7 @@ static int kodak605_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(ctx->datalen);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -1088,7 +1088,7 @@ static int kodak6800_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(ctx->datalen);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -553,7 +553,7 @@ static int magicard_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(MAX_PRINTJOB_LEN);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Copy over initial header */
|
||||
|
@ -680,7 +680,7 @@ static int magicard_read_parse(void *vctx, int data_fd) {
|
|||
uint8_t *srcbuf = malloc(MAX_PRINTJOB_LEN);
|
||||
if (!srcbuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
memcpy(srcbuf, initial_buf + buf_offset, srcbuf_offset);
|
||||
|
|
|
@ -985,7 +985,7 @@ repeat:
|
|||
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
memcpy(ctx->databuf + ctx->datalen, &mhdr, sizeof(mhdr));
|
||||
|
@ -1014,7 +1014,7 @@ repeat:
|
|||
spoolbuflen = 0; spoolbuf = malloc(remain);
|
||||
if (!spoolbuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Read in the BGR data */
|
||||
|
@ -1034,7 +1034,7 @@ repeat:
|
|||
uint8_t *buf = malloc(LUT_LEN);
|
||||
if (!buf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
if (ctx->Get3DColorTable(buf, ctx->lutfname)) {
|
||||
ERROR("Unable to open LUT file '%s'\n", ctx->lutfname);
|
||||
|
|
|
@ -409,7 +409,7 @@ hdr_done:
|
|||
ctx->databuf = malloc(remain);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Back off the data to read if the backend generates the matte data internally */
|
||||
|
|
|
@ -243,7 +243,7 @@ top:
|
|||
ctx->databuf = malloc(remain);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
/* Read it in */
|
||||
|
|
|
@ -1357,7 +1357,7 @@ static int shinkos1245_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(ctx->datalen);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -1472,7 +1472,7 @@ static int shinkos2145_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(ctx->datalen);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -2115,7 +2115,7 @@ static int shinkos6145_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(ctx->datalen);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -1572,7 +1572,7 @@ static int shinkos6245_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(ctx->datalen);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ static int updr150_read_parse(void *vctx, int data_fd) {
|
|||
ctx->databuf = malloc(MAX_PRINTJOB_LEN);
|
||||
if (!ctx->databuf) {
|
||||
ERROR("Memory allocation failure!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
return CUPS_BACKEND_RETRY_CURRENT;
|
||||
}
|
||||
|
||||
while(run) {
|
||||
|
|
Loading…
Reference in New Issue