--- liblscp/trunk/src/common.c 2019/12/22 12:41:28 3663 +++ liblscp/trunk/src/common.c 2019/12/22 12:53:26 3664 @@ -24,6 +24,7 @@ #include #include +#include // Split chunk size magic: @@ -120,6 +121,7 @@ int iErrno; char *pszResult; int cchResult; + ssize_t sz; lscp_status_t ret = LSCP_FAILED; @@ -156,9 +158,12 @@ // Send data, and then, wait for the result... cchQuery = strlen(pszQuery); - if (send(pClient->cmd.sock, pszQuery, cchQuery, 0) < cchQuery) { + sz = send(pClient->cmd.sock, pszQuery, cchQuery, 0); + if (sz < cchQuery) { lscp_socket_perror("lscp_client_call: send"); pszResult = "Failure during send operation"; + if (sz < 0) + iErrno = -errno; lscp_client_set_result(pClient, pszResult, iErrno); return ret; }