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

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

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

revision 3865 by capela, Thu Dec 17 08:36:44 2020 UTC revision 3866 by capela, Sat Mar 27 12:17:51 2021 UTC
# Line 2  Line 2 
2  //  //
3  /****************************************************************************  /****************************************************************************
4     liblscp - LinuxSampler Control Protocol API     liblscp - LinuxSampler Control Protocol API
5     Copyright (C) 2004-2020, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2021, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This library is free software; you can redistribute it and/or     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Lesser General Public     modify it under the terms of the GNU Lesser General Public
# Line 108  static void _lscp_client_evt_proc ( void Line 108  static void _lscp_client_evt_proc ( void
108    
109          lscp_event_t event;          lscp_event_t event;
110    
111  #ifdef DEBUG  #ifdef CONFIG_DEBUG
112          fprintf(stderr, "_lscp_client_evt_proc: Client waiting for events.\n");          fprintf(stderr, "_lscp_client_evt_proc: Client waiting for events.\n");
113  #endif  #endif
114    
# Line 177  static void _lscp_client_evt_proc ( void Line 177  static void _lscp_client_evt_proc ( void
177                  lscp_cond_signal(pClient->cond);                  lscp_cond_signal(pClient->cond);
178          }          }
179    
180  #ifdef DEBUG  #ifdef CONFIG_DEBUG
181          fprintf(stderr, "_lscp_client_evt_proc: Client closing.\n");          fprintf(stderr, "_lscp_client_evt_proc: Client closing.\n");
182  #endif  #endif
183  }  }
# Line 209  static lscp_status_t _lscp_client_evt_co Line 209  static lscp_status_t _lscp_client_evt_co
209                  lscp_socket_perror("lscp_client_evt_connect: setsockopt(SO_DONTLINGER)");                  lscp_socket_perror("lscp_client_evt_connect: setsockopt(SO_DONTLINGER)");
210  #endif  #endif
211    
212  #ifdef DEBUG  #ifdef CONFIG_DEBUG
213          lscp_socket_getopts("_lscp_client_evt_connect:", sock);          lscp_socket_getopts("_lscp_client_evt_connect:", sock);
214  #endif  #endif
215    
# Line 364  lscp_client_t* lscp_client_create ( cons Line 364  lscp_client_t* lscp_client_create ( cons
364          pClient->pfnCallback = pfnCallback;          pClient->pfnCallback = pfnCallback;
365          pClient->pvData = pvData;          pClient->pvData = pvData;
366    
367  #ifdef DEBUG  #ifdef CONFIG_DEBUG
368          fprintf(stderr,          fprintf(stderr,
369                  "lscp_client_create: pClient=%p: pszHost=%s iPort=%d.\n",                  "lscp_client_create: pClient=%p: pszHost=%s iPort=%d.\n",
370                   pClient, pszHost, iPort);                   pClient, pszHost, iPort);
# Line 389  lscp_client_t* lscp_client_create ( cons Line 389  lscp_client_t* lscp_client_create ( cons
389                                  (char *) &iSockOpt, sizeof(int)) == SOCKET_ERROR)                                  (char *) &iSockOpt, sizeof(int)) == SOCKET_ERROR)
390                          lscp_socket_perror("lscp_client_create: cmd: setsockopt(SO_DONTLINGER)");                          lscp_socket_perror("lscp_client_create: cmd: setsockopt(SO_DONTLINGER)");
391          #endif          #endif
392          #ifdef DEBUG          #ifdef CONFIG_DEBUG
393                  lscp_socket_getopts("lscp_client_create: cmd", sock);                  lscp_socket_getopts("lscp_client_create: cmd", sock);
394          #endif          #endif
395                  if (connect(sock, res->ai_addr, res->ai_addrlen) != SOCKET_ERROR)                  if (connect(sock, res->ai_addr, res->ai_addrlen) != SOCKET_ERROR)
# Line 431  lscp_client_t* lscp_client_create ( cons Line 431  lscp_client_t* lscp_client_create ( cons
431                  lscp_socket_perror("lscp_client_create: cmd: setsockopt(SO_DONTLINGER)");                  lscp_socket_perror("lscp_client_create: cmd: setsockopt(SO_DONTLINGER)");
432  #endif  #endif
433    
434  #ifdef DEBUG  #ifdef CONFIG_DEBUG
435          lscp_socket_getopts("lscp_client_create: cmd", sock);          lscp_socket_getopts("lscp_client_create: cmd", sock);
436  #endif  #endif
437    
# Line 453  lscp_client_t* lscp_client_create ( cons Line 453  lscp_client_t* lscp_client_create ( cons
453    
454  #endif  /* !USE_GETADDRINFO */  #endif  /* !USE_GETADDRINFO */
455    
456  #ifdef DEBUG  #ifdef CONFIG_DEBUG
457          fprintf(stderr,          fprintf(stderr,
458                  "lscp_client_create: cmd: pClient=%p: sock=%d addr=%s port=%d.\n",                  "lscp_client_create: cmd: pClient=%p: sock=%d addr=%s port=%d.\n",
459                  pClient, pClient->cmd.sock,                  pClient, pClient->cmd.sock,
# Line 520  lscp_status_t lscp_client_join ( lscp_cl Line 520  lscp_status_t lscp_client_join ( lscp_cl
520          if (pClient == NULL)          if (pClient == NULL)
521                  return LSCP_FAILED;                  return LSCP_FAILED;
522    
523  #ifdef DEBUG  #ifdef CONFIG_DEBUG
524          fprintf(stderr, "lscp_client_join: pClient=%p.\n", pClient);          fprintf(stderr, "lscp_client_join: pClient=%p.\n", pClient);
525  #endif  #endif
526    
# Line 543  lscp_status_t lscp_client_destroy ( lscp Line 543  lscp_status_t lscp_client_destroy ( lscp
543          if (pClient == NULL)          if (pClient == NULL)
544                  return LSCP_FAILED;                  return LSCP_FAILED;
545    
546  #ifdef DEBUG  #ifdef CONFIG_DEBUG
547          fprintf(stderr, "lscp_client_destroy: pClient=%p.\n", pClient);          fprintf(stderr, "lscp_client_destroy: pClient=%p.\n", pClient);
548  #endif  #endif
549    

Legend:
Removed from v.3865  
changed lines
  Added in v.3866

  ViewVC Help
Powered by ViewVC