aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/libmmbackend.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-23 00:15:00 +0100
committercbdev <cb@cbcdn.com>2020-03-23 00:15:00 +0100
commit37e712edf23a49be5387f945ab9ea57cc0b57f22 (patch)
tree5037b14bdbd08baa8f104f7e4946aa5643281a94 /backends/libmmbackend.c
parent666aec036f9bf0de82c435bd7eace271613cee1e (diff)
parentaa02ccf3abf183207b24fcbb9460cbd904a698e2 (diff)
downloadmidimonster-37e712edf23a49be5387f945ab9ea57cc0b57f22.tar.gz
midimonster-37e712edf23a49be5387f945ab9ea57cc0b57f22.tar.bz2
midimonster-37e712edf23a49be5387f945ab9ea57cc0b57f22.zip
Merge current master
Diffstat (limited to 'backends/libmmbackend.c')
-rw-r--r--backends/libmmbackend.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/libmmbackend.c b/backends/libmmbackend.c
index ffa403b..b9513ac 100644
--- a/backends/libmmbackend.c
+++ b/backends/libmmbackend.c
@@ -153,7 +153,11 @@ int mmbackend_socket(char* host, char* port, int socktype, uint8_t listener, uin
int mmbackend_send(int fd, uint8_t* data, size_t length){
ssize_t total = 0, sent;
while(total < length){
+ #ifndef LIBMMBACKEND_TCP_TORTURE
sent = send(fd, data + total, length - total, 0);
+ #else
+ sent = send(fd, data + total, 1, 0);
+ #endif
if(sent < 0){
LOGPF("Failed to send: %s", strerror(errno));
return 1;