diff --git a/locale/tr/LC_MESSAGES/libmp.po b/locale/tr/LC_MESSAGES/libmp.po index 6d43070..be552ae 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-08-09 02:56+0300\n" +"POT-Creation-Date: 2024-08-09 03:16+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/client.c b/src/mptp/client.c index 2428558..2e2e905 100644 --- a/src/mptp/client.c +++ b/src/mptp/client.c @@ -74,7 +74,7 @@ bool lm_mptp_client_send(int sock, lm_mptp_t *packet) { copy_to_buffer(buffer, packet->host, packet->header.host_size, &total, &used); copy_to_buffer(buffer, packet->data, packet->header.data_size, &total, &used); - if (send(sock, buffer, sizeof(buffer), 0) < 0) { + if (send(sock, buffer, sizeof(buffer), MSG_MORE) < 0) { lm_error_set(LM_ERR_MPTPSendFail); return false; } diff --git a/src/mptp/mptp.c b/src/mptp/mptp.c index 378b375..f7f49ff 100644 --- a/src/mptp/mptp.c +++ b/src/mptp/mptp.c @@ -97,6 +97,12 @@ bool lm_mptp_socket_opts(int sock){ return false; } + if (setsockopt(sock, SOL_TCP, TCP_CORK, &flags, sizeof(int)) < 0) { + lm_error_set(LM_ERR_MPTPSetsockopt); + lm_mptp_close(sock); + return false; + } + return true; } diff --git a/src/mptp/server.c b/src/mptp/server.c index 860962f..b58d295 100644 --- a/src/mptp/server.c +++ b/src/mptp/server.c @@ -120,7 +120,7 @@ bool lm_mptp_server_send(int sock, lm_mptp_t *packet) { copy_to_buffer(buffer, packet->host, packet->header.host_size, &total, &used); copy_to_buffer(buffer, packet->data, packet->header.data_size, &total, &used); - if (send(sock, buffer, buflen, 0) < 0) { + if (send(sock, buffer, buflen, MSG_MORE) < 0) { lm_error_set(LM_ERR_MPTPSendFail); return false; }