+1998-09-16 Nathan Bryant <bryant@cs.usm.maine.edu>
+ * ipc_c_tcp.c: Fixed up some #include/prototyping stuff, call memcpy()
+ instead of bcopy()
+
Wed Sep 16 11:42:42 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* ipc_c_tcp.c: Reversed any changes that have been made to this file,
because something was causing abominally slow response time.
/*
- * ipc_c_std.c
+ * ipc_c_tcp.c
*
* Citadel/UX client/server IPC - client module using TCP/IP
*
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netdb.h>
#include <string.h>
#include <pwd.h>
#include <errno.h>
-
-void logoff();
+#include "citadel_decls.h"
+#include "ipc.h"
/*
* If server_is_local is set to nonzero, the client assumes that it is running
int serv_sock;
-u_long inet_addr(/* ??? */);
-
-void timeout(void) {
+void timeout(int signum) {
printf("\rConnection timed out.\n");
logoff(3);
}
phe=gethostbyname(host);
if (phe) {
- bcopy(phe->h_addr,(char *)&sin.sin_addr,phe->h_length);
+ memcpy(&sin.sin_addr,phe->h_addr,phe->h_length);
}
else if ((sin.sin_addr.s_addr = inet_addr(host))==INADDR_NONE) {
fprintf(stderr,"Can't get %s host entry: %s\n",
phe=gethostbyname(host);
if (phe) {
- bcopy(phe->h_addr,(char *)&sin.sin_addr,phe->h_length);
+ memcpy(&sin.sin_addr,phe->h_addr,phe->h_length);
}
else if ((sin.sin_addr.s_addr = inet_addr(host))==INADDR_NONE) {
fprintf(stderr,"Can't get %s host entry: %s\n",