]> code.citadel.org Git - citadel.git/commitdiff
* ipc_c_tcp.c: Fixed up some #include/prototyping stuff, call memcpy()
authorNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 16 Sep 1998 17:38:38 +0000 (17:38 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Wed, 16 Sep 1998 17:38:38 +0000 (17:38 +0000)
          instead of bcopy()

citadel/ChangeLog
citadel/ipc_c_tcp.c

index f3f20891b3702a6c557c24b23d0abf411c2715bb..f8e347dc46990ab65755be8afd34aca2158920fe 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 3a8667f8d2e75d63b67562c42b812e229e326372..c3d5aa4c5281e0d6c8b9bef5c31d493609c5b749 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -45,9 +46,7 @@ char server_is_local = 0;
 
 int serv_sock;
 
-u_long inet_addr(/* ??? */);
-
-void timeout(void) {
+void timeout(int signum) {
        printf("\rConnection timed out.\n");
        logoff(3);
        }
@@ -75,7 +74,7 @@ int connectsock(char *host, char *service, char *protocol)
        
        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",
@@ -146,7 +145,7 @@ void numericize(unsigned char *buf, char *host, char *service, char *protocol)
        
        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",