Lines 656-662
bool DespoolAttributesFromFile(JobControlRecord* jcr,
Link Here
|
656 |
bool retval = false; |
656 |
bool retval = false; |
657 |
int32_t pktsiz; |
657 |
int32_t pktsiz; |
658 |
size_t nbytes; |
658 |
size_t nbytes; |
659 |
ssize_t size = 0; |
659 |
//ssize_t size = 0; // sysutils/bareos-server/work/bareos-Release-21.0.0/core/src/dird/catreq.cc:659:11: error: variable 'size' set but not used [-Werror,-Wunused-but-set-variable] |
660 |
int32_t message_length; /* message length */ |
660 |
int32_t message_length; /* message length */ |
661 |
int spool_fd = -1; |
661 |
int spool_fd = -1; |
662 |
POOLMEM* msg = GetPoolMemory(PM_MESSAGE); |
662 |
POOLMEM* msg = GetPoolMemory(PM_MESSAGE); |
Lines 680-686
bool DespoolAttributesFromFile(JobControlRecord* jcr,
Link Here
|
680 |
|
680 |
|
681 |
while ((nbytes = read(spool_fd, (char*)&pktsiz, sizeof(int32_t))) |
681 |
while ((nbytes = read(spool_fd, (char*)&pktsiz, sizeof(int32_t))) |
682 |
== sizeof(int32_t)) { |
682 |
== sizeof(int32_t)) { |
683 |
size += sizeof(int32_t); |
683 |
//size += sizeof(int32_t); |
684 |
message_length = ntohl(pktsiz); |
684 |
message_length = ntohl(pktsiz); |
685 |
|
685 |
|
686 |
if (message_length > 0) { |
686 |
if (message_length > 0) { |
Lines 697-703
bool DespoolAttributesFromFile(JobControlRecord* jcr,
Link Here
|
697 |
goto bail_out; |
697 |
goto bail_out; |
698 |
} |
698 |
} |
699 |
msg[nbytes] = '\0'; |
699 |
msg[nbytes] = '\0'; |
700 |
size += nbytes; |
700 |
//size += nbytes; |
701 |
} |
701 |
} |
702 |
|
702 |
|
703 |
if (!jcr->IsJobCanceled()) { |
703 |
if (!jcr->IsJobCanceled()) { |