diff --git a/locale/tr/LC_MESSAGES/libmp.po b/locale/tr/LC_MESSAGES/libmp.po index 7db0e02..5674340 100644 --- a/locale/tr/LC_MESSAGES/libmp.po +++ b/locale/tr/LC_MESSAGES/libmp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-16 19:29+0300\n" +"POT-Creation-Date: 2024-07-16 19:57+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/mptp/util.c b/src/mptp/util.c index 1275f63..899be9b 100644 --- a/src/mptp/util.c +++ b/src/mptp/util.c @@ -51,6 +51,10 @@ bool lm_mptp_sendfile(int sock, struct sockaddr *addr, char *path, lm_mptp_trans packet.header.data_size = size; lm_mptp_server_send(sock, &packet, addr); + if(NULL != callback) + if(!callback(path, current, total, data)) + goto end; + // clear the packet lm_mptp_init(&packet, false, MPTP_S2C_COOL, false); @@ -123,6 +127,10 @@ bool lm_mptp_recvfile(int sock, char *path, lm_mptp_transfer_callback_t callback lm_error_set(LM_ERR_RecvBadSize); goto end; } + + if(NULL != callback) + if(!callback(path, current, total, data)) + goto end; while(lm_mptp_client_recv(sock, &packet)){ if(!lm_mptp_client_verify(&packet))