[netperf-dev] netperf4 commit notice r154 - branches/glib_migration/src

raj at netperf.org raj at netperf.org
Wed Apr 12 17:30:22 PDT 2006


Author: raj
Date: 2006-04-12 17:30:21 -0700 (Wed, 12 Apr 2006)
New Revision: 154

Modified:
   branches/glib_migration/src/netlib.c
   branches/glib_migration/src/netlib.h
   branches/glib_migration/src/netperf.c
Log:
Win64 cleanups, incomplete

Modified: branches/glib_migration/src/netlib.c
===================================================================
--- branches/glib_migration/src/netlib.c	2006-04-12 23:49:15 UTC (rev 153)
+++ branches/glib_migration/src/netlib.c	2006-04-13 00:30:21 UTC (rev 154)
@@ -1703,7 +1703,7 @@
 
 */
 
-int
+SOCKET
 establish_listen(char *hostname, char *service, int af, netperf_socklen_t *addrlenp)
 {
   SOCKET sockfd;
@@ -1832,7 +1832,7 @@
 
 raj 2003-02-27 */
 
-int
+SOCKET
 establish_control(xmlChar *hostname,
                   xmlChar *port,
                   int      remfam,
@@ -1841,7 +1841,7 @@
                   int      locfam)
 {
   int not_connected;
-  int control_sock;
+  SOCKET control_sock;
   int count;
   int error;
 
@@ -1960,7 +1960,7 @@
     control_sock = socket(local_res_temp->ai_family,
                           SOCK_STREAM,
                           0);
-    if (control_sock < 0) {
+    if (control_sock == INVALID_SOCKET) {
       /* at some point we'll need a more generic "display error"
          message for when/if we use GUIs and the like. unlike a bind
          or connect failure, failure to allocate a socket is
@@ -2546,7 +2546,7 @@
 
 
 int32_t
-recv_control_message(int control_sock, xmlDocPtr *message)
+recv_control_message(SOCKET control_sock, xmlDocPtr *message)
 {
   int loc_debug = 0;
   int32_t bytes_recvd = 0,

Modified: branches/glib_migration/src/netlib.h
===================================================================
--- branches/glib_migration/src/netlib.h	2006-04-12 23:49:15 UTC (rev 153)
+++ branches/glib_migration/src/netlib.h	2006-04-13 00:30:21 UTC (rev 154)
@@ -106,7 +106,7 @@
 extern int strtofam(xmlChar *familystr);
 extern void dump_addrinfo(FILE *dumploc, struct addrinfo *info,
 			  xmlChar *host, xmlChar *port, int family);
-extern int establish_control(xmlChar *hostname,  xmlChar *port, int remfam,
+extern SOCKET establish_control(xmlChar *hostname,  xmlChar *port, int remfam,
 			     xmlChar *localhost, xmlChar *localport, int locfam);
 extern int get_test_function(test_t *test, const xmlChar *func);
 extern int add_test_to_hash(test_t *new_test);
@@ -114,12 +114,12 @@
 				       xmlNodePtr body,
 				       xmlChar *nid,
 				       const xmlChar *fromnid);
-extern int32_t recv_control_message(int control_sock, xmlDocPtr *message);
+extern int32_t recv_control_message(SOCKET control_sock, xmlDocPtr *message);
 extern void report_server_error(server_t *server);
 extern int launch_thread(GThread **tid, void *(*start_routine)(void *), void *data);
 extern void break_args_explicit(char *s, char *arg1, char *arg2);
 extern int parse_address_family(char family_string[]);
-extern int establish_listen(char *hostname, char *service, 
+extern SOCKET establish_listen(char *hostname, char *service, 
 			    int af, netperf_socklen_t *addrlenp);
 
 extern int netperf_complete_filename(char *name, char *full, int fulllen);

Modified: branches/glib_migration/src/netperf.c
===================================================================
--- branches/glib_migration/src/netperf.c	2006-04-12 23:49:15 UTC (rev 153)
+++ branches/glib_migration/src/netperf.c	2006-04-13 00:30:21 UTC (rev 154)
@@ -615,7 +615,7 @@
 }
 
 
-static int
+static SOCKET
 connect_netserver(xmlDocPtr doc, xmlNodePtr netserver, server_t *new_server)
 {
   xmlChar   *remotehost;
@@ -625,7 +625,7 @@
 
   int      localfamily;
   int      remotefamily;
-  int      sock;
+  SOCKET      sock;
 
   /* validation means that we know that the host informaion is in attributes
      of the netserver element. The xml parser checked them and initialized



More information about the netperf-dev mailing list