|
From: Bob T. <bt...@us...> - 2003-10-08 01:41:58
|
Update of /cvsroot/benson/benson3/src
In directory sc8-pr-cvs1:/tmp/cvs-serv23352/src
Modified Files:
utils.c
Log Message:
Here goes, lets see if this works over on unix now.
Index: utils.c
===================================================================
RCS file: /cvsroot/benson/benson3/src/utils.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** utils.c 7 Oct 2003 01:11:54 -0000 1.14
--- utils.c 8 Oct 2003 01:41:51 -0000 1.15
***************
*** 67,98 ****
- int ibn_tcp_connect(char *forwarder, int port) {
- struct hostent *hp;
- struct sockaddr_in addr;
- int sock;
-
- if(!(hp=gethostbyname(forwarder))) {
- fprintf(stderr, "Couldn't resolve hostname: %s\n", hstrerror(h_errno));
- return ERROR;
- }
- memset(&addr, 0, sizeof(addr));
- addr.sin_addr=*(struct in_addr*)hp->h_addr_list[0];
- addr.sin_family=AF_INET;
- addr.sin_port=htons(port);
-
- if((sock=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP))<0) {
- fprintf(stderr, "Couldn't create socket(): %s\n", strerror(errno));
- return ERROR;
-
- }
- if(connect(sock, (struct sockaddr *)&addr, sizeof(addr))<0) {
- fprintf(stderr, "Couldn't connect() to host: %s\n", strerror(errno));
- return ERROR;
- }
- endhostent();
-
- return sock;
- }
-
int ibn_next_sequence(void) {
extern int sequence;
--- 67,70 ----
***************
*** 189,192 ****
--- 161,165 ----
return GOOD;
}
+
void *ibn_malloc(size_t length)
|