"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Singular/links/ssiLink.cc" between
singular-4.2.0p3.tar.gz and singular-4.2.1.tar.gz

About: SINGULAR is a Computer Algebra System for polynomial computations, with special emphasis on commutative and non-commutative algebra, algebraic geometry, and singularity theory.

ssiLink.cc  (singular-4.2.0p3):ssiLink.cc  (singular-4.2.1)
skipping to change at line 2036 skipping to change at line 2036
} }
STATIC_VAR int ssiReserved_P=0; STATIC_VAR int ssiReserved_P=0;
STATIC_VAR int ssiReserved_sockfd; STATIC_VAR int ssiReserved_sockfd;
STATIC_VAR struct sockaddr_in ssiResverd_serv_addr; STATIC_VAR struct sockaddr_in ssiResverd_serv_addr;
STATIC_VAR int ssiReserved_Clients; STATIC_VAR int ssiReserved_Clients;
int ssiReservePort(int clients) int ssiReservePort(int clients)
{ {
if (ssiReserved_P!=0) if (ssiReserved_P!=0)
{ {
WerrorS("ERROR already a reverved port requested"); WerrorS("ERROR already a reserved port requested");
return 0; return 0;
} }
int portno; int portno;
ssiReserved_sockfd = socket(AF_INET, SOCK_STREAM, 0); ssiReserved_sockfd = socket(AF_INET, SOCK_STREAM, 0);
if(ssiReserved_sockfd < 0) if(ssiReserved_sockfd < 0)
{ {
WerrorS("ERROR opening socket"); WerrorS("ERROR opening socket");
return 0; return 0;
} }
memset((char *) &ssiResverd_serv_addr,0, sizeof(ssiResverd_serv_addr)); memset((char *) &ssiResverd_serv_addr,0, sizeof(ssiResverd_serv_addr));
skipping to change at line 2072 skipping to change at line 2072
listen(ssiReserved_sockfd,clients); listen(ssiReserved_sockfd,clients);
ssiReserved_Clients=clients; ssiReserved_Clients=clients;
return portno; return portno;
} }
EXTERN_VAR si_link_extension si_link_root; EXTERN_VAR si_link_extension si_link_root;
si_link ssiCommandLink() si_link ssiCommandLink()
{ {
if (ssiReserved_P==0) if (ssiReserved_P==0)
{ {
WerrorS("ERROR no reverved port requested"); WerrorS("ERROR no reserved port requested");
return NULL; return NULL;
} }
struct sockaddr_in cli_addr; struct sockaddr_in cli_addr;
int clilen = sizeof(cli_addr); int clilen = sizeof(cli_addr);
int newsockfd = si_accept(ssiReserved_sockfd, (struct sockaddr *) &cli_addr, ( socklen_t *)&clilen); int newsockfd = si_accept(ssiReserved_sockfd, (struct sockaddr *) &cli_addr, ( socklen_t *)&clilen);
if(newsockfd < 0) if(newsockfd < 0)
{ {
Werror("ERROR on accept (errno=%d)",errno); Werror("ERROR on accept (errno=%d)",errno);
return NULL; return NULL;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)