Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27290
Modified Files: Tag: desiredata u_pdsend.c Log Message: removed the code for retries
Index: u_pdsend.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_pdsend.c,v retrieving revision 1.2.8.1 retrieving revision 1.2.8.1.2.1 diff -C2 -d -r1.2.8.1 -r1.2.8.1.2.1 *** u_pdsend.c 12 Jul 2005 15:11:13 -0000 1.2.8.1 --- u_pdsend.c 31 Dec 2006 07:28:42 -0000 1.2.8.1.2.1 *************** *** 33,37 **** struct hostent *hp; char *hostname; - int nretry = 10; #ifdef MSW short version = MAKEWORD(2, 0); --- 33,36 ---- *************** *** 73,98 **** memcpy((char *)&server.sin_addr, (char *)hp->h_addr, hp->h_length);
! /* assign client port number */ server.sin_port = htons((unsigned short)portno);
- #if 0 /* try this again for 4.0; this crashed my RH 6.2 machine!) */ - - /* try to connect. */ - for (nretry = 0; nretry < (protocol == SOCK_STREAM ? 10 : 1); nretry++) - - { - if (nretry > 0) - { - sleep (nretry < 5 ? 1 : 5); - fprintf(stderr, "retrying..."); - } - if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) >= 0) - goto connected; - sockerror("connect"); - } - x_closesocket(sockfd); - exit(1); - connected: ; - #else /* try to connect. */ if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) < 0) --- 72,78 ---- memcpy((char *)&server.sin_addr, (char *)hp->h_addr, hp->h_length);
! /* assign client port number */ server.sin_port = htons((unsigned short)portno);
/* try to connect. */ if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) < 0) *************** *** 102,107 **** exit(1); } ! #endif ! /* now loop reading stdin and sending it to socket */ while (1) { --- 82,87 ---- exit(1); } ! ! /* now loop reading stdin and sending it to socket */ while (1) {