24 |
|
|
25 |
#include <ctype.h> |
#include <ctype.h> |
26 |
#include <sys/time.h> |
#include <sys/time.h> |
27 |
|
#include <sys/errno.h> |
28 |
|
|
29 |
|
|
30 |
// Split chunk size magic: |
// Split chunk size magic: |
121 |
int iErrno; |
int iErrno; |
122 |
char *pszResult; |
char *pszResult; |
123 |
int cchResult; |
int cchResult; |
124 |
|
ssize_t sz; |
125 |
|
|
126 |
lscp_status_t ret = LSCP_FAILED; |
lscp_status_t ret = LSCP_FAILED; |
127 |
|
|
158 |
|
|
159 |
// Send data, and then, wait for the result... |
// Send data, and then, wait for the result... |
160 |
cchQuery = strlen(pszQuery); |
cchQuery = strlen(pszQuery); |
161 |
if (send(pClient->cmd.sock, pszQuery, cchQuery, 0) < cchQuery) { |
sz = send(pClient->cmd.sock, pszQuery, cchQuery, 0); |
162 |
|
if (sz < cchQuery) { |
163 |
lscp_socket_perror("lscp_client_call: send"); |
lscp_socket_perror("lscp_client_call: send"); |
164 |
pszResult = "Failure during send operation"; |
pszResult = "Failure during send operation"; |
165 |
|
if (sz < 0) |
166 |
|
iErrno = -errno; |
167 |
lscp_client_set_result(pClient, pszResult, iErrno); |
lscp_client_set_result(pClient, pszResult, iErrno); |
168 |
return ret; |
return ret; |
169 |
} |
} |