Changeset 3788:fe1762804632 in roaraudio for libroar/socket.c
- Timestamp:
- 05/07/10 15:44:52 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/socket.c
r3785 r3788 59 59 int opt = IPTOS_LOWDELAY; 60 60 #endif 61 #if def TCP_NODELAY61 #if defined(TCP_NODELAY) && !defined(ROAR_TARGET_WIN32) 62 62 int t = 1; 63 63 #endif … … 70 70 setsockopt(fh, IPPROTO_IP, IP_TOS, &opt, sizeof(int)); 71 71 #endif 72 #if def TCP_NODELAY72 #if defined(TCP_NODELAY) && !defined(ROAR_TARGET_WIN32) 73 73 setsockopt(fh, IPPROTO_TCP, TCP_NODELAY, &t, sizeof(int)); 74 74 #endif … … 476 476 #ifdef ROAR_HAVE_IPX 477 477 #define _NEED_OBJ 478 int i;479 478 int ret; 479 #endif 480 #ifdef ROAR_HAVE_IPX 481 unsigned int ipx_port; 480 482 #endif 481 483 #ifdef ROAR_HAVE_UNIX … … 503 505 #endif 504 506 //unsigned int host_div = 0; 507 #ifdef ROAR_TARGET_WIN32 508 int PASCAL (*mode_func)(SOCKET,const struct sockaddr*,int) = connect; // default is to connect 509 #else 505 510 int (*mode_func)(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) = connect; // default is to connect 511 #endif 506 512 #ifdef ROAR_HAVE_LIBDNET 507 513 #define _NEED_OBJ … … 649 655 obj[0] = 0; 650 656 651 if ( (ret = sscanf(host, "%8x.%12s(%x)", &socket_addr.ipx.sipx_network, obj, 652 (unsigned int *)&socket_addr.ipx.sipx_port)) < 2 ) {653 return -1;657 if ( (ret = sscanf(host, "%8x.%12s(%x)", &socket_addr.ipx.sipx_network, obj, &ipx_port)) < 2 ) { 658 return -1; 659 socket_addr.ipx.sipx_port = ipx_port; 654 660 } else if ( ret == 2 ) { 655 661 socket_addr.ipx.sipx_port = port; // Network Byte Order?
Note: See TracChangeset
for help on using the changeset viewer.