update: more MPTP util debug messages
This commit is contained in:
parent
bee0073e58
commit
d75b8b9c1b
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-08-09 01:27+0300\n"
|
||||
"POT-Creation-Date: 2024-08-09 02:22+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -137,18 +137,24 @@ bool lm_mptp_recvfile(int sock, char *path, lm_mptp_transfer_callback_t callback
|
||||
goto end;
|
||||
|
||||
while(lm_mptp_client_recv(sock, &packet)){
|
||||
if(!lm_mptp_client_verify(&packet))
|
||||
if(!lm_mptp_client_verify(&packet)){
|
||||
pdebug(__func__, "failed to verify the packet for %s (%lu/%lu)", path, current, total);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if(MPTP_FLAGS_CODE(&packet) != MPTP_S2C_COOL){
|
||||
pdebug(__func__, "server responded with bad status code for %s (%lu/%lu)", path, current, total);
|
||||
lm_error_set(LM_ERR_RecvBadCode);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if(MPTP_IS_LAST(&packet))
|
||||
if(MPTP_IS_LAST(&packet)){
|
||||
pdebug(__func__, "received the last packet for %s (%lu/%lu)", path, current, total);
|
||||
break;
|
||||
}
|
||||
|
||||
if(fwrite(packet.data, 1, packet.header.data_size, file)==0){
|
||||
pdebug(__func__, "failed to write received data for %s (%lu/%lu)", path, current, total);
|
||||
lm_error_set(LM_ERR_RecvWriteFail);
|
||||
goto end;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user