Changeset 18058 for trunk/FACT++/dim/src/tcpip.c
- Timestamp:
- 01/03/15 18:26:23 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/src/tcpip.c
r15282 r18058 436 436 return(1); 437 437 } 438 439 #ifdef __linux__ 440 int tcpip_get_send_space(int conn_id) 441 { 442 int ret, n_bytes; 443 444 ret = ioctl(Net_conns[conn_id].channel, TIOCOUTQ, &n_bytes ); 445 if(ret == -1) 446 { 447 #ifdef DEBUG 448 printf("Couln't get send buffer free size, ret = %d\n", ret); 449 #endif 450 return(0); 451 } 452 /* 453 printf("tcpip_get_send_space %d\n", Write_buffer_size - n_bytes); 454 */ 455 return(Write_buffer_size - n_bytes); 456 } 457 #endif 438 458 439 459 /* … … 905 925 ipaddr[3] = (unsigned char)d; 906 926 host_number = 1; 927 /* 907 928 #ifndef VxWorks 908 929 if( gethostbyaddr(ipaddr, sizeof(ipaddr), AF_INET) == (struct hostent *)0 ) … … 913 934 ret = WSAGetLastError(); 914 935 #endif 915 if((ret == HOST_NOT_FOUND) || (ret == NO_DATA)) 916 { 917 if(!check_node_addr(node, ipaddr)) 918 return(0); 919 } 920 } 921 #endif 936 // if((ret == HOST_NOT_FOUND) || (ret == NO_DATA)) 937 // { 938 // if(!check_node_addr(node, ipaddr)) 939 // return(0); 940 // } 941 } 942 #endif 943 */ 922 944 } 923 945 #ifndef VxWorks … … 1306 1328 1307 1329 set_non_blocking(Net_conns[conn_id].channel); 1330 /* 1331 #ifdef __linux__ 1332 tcpip_get_send_space(conn_id); 1333 #endif 1334 */ 1308 1335 wrote = (int)writesock( Net_conns[conn_id].channel, buffer, (size_t)size, 0 ); 1309 1336 #ifndef WIN32 … … 1696 1723 #ifndef WIN32 1697 1724 if(code){} 1698 if((errno == ENOENT) && (h_errno == HOST_NOT_FOUND))1725 if((errno == 0) && (h_errno == HOST_NOT_FOUND)) 1699 1726 strcpy(str,"Host not found"); 1700 1727 else
Note:
See TracChangeset
for help on using the changeset viewer.