/[svn]/liblscp/trunk/src/common.c
ViewVC logotype

Diff of /liblscp/trunk/src/common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3663 by schoenebeck, Sun Dec 22 12:41:28 2019 UTC revision 3664 by schoenebeck, Sun Dec 22 12:53:26 2019 UTC
# Line 24  Line 24 
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:
# Line 120  lscp_status_t lscp_client_call ( lscp_cl Line 121  lscp_status_t lscp_client_call ( lscp_cl
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                    
# Line 156  lscp_status_t lscp_client_call ( lscp_cl Line 158  lscp_status_t lscp_client_call ( lscp_cl
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          }          }

Legend:
Removed from v.3663  
changed lines
  Added in v.3664

  ViewVC Help
Powered by ViewVC