Index: trunk/Ohana/src/opihi/pantasks/SocketOps.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/SocketOps.c	(revision 7892)
+++ trunk/Ohana/src/opihi/pantasks/SocketOps.c	(revision 7917)
@@ -33,5 +33,5 @@
   status = inet_aton (hostip, &Address[0].sin_addr);
   if (!status) {
-    fprintf (stderr, "invalid address\n");
+    gprint (GP_ERR, "invalid address\n");
     exit (2);
   }
@@ -46,5 +46,5 @@
   }
 
-  if (DEBUG) fprintf (stderr, "init sock: %d, len: %d\n", InitSocket, length);
+  if (DEBUG) gprint (GP_ERR, "init sock: %d, len: %d\n", InitSocket, length);
   status = bind (InitSocket, (struct sockaddr *) Address, length);
   if (status == -1) {
@@ -74,7 +74,7 @@
   fcntl (InitSocket, F_SETFL, !O_NONBLOCK); 
 
-  if (DEBUG) fprintf (stderr, "init sock: %d, len: %d\n", InitSocket, length);
+  if (DEBUG) gprint (GP_ERR, "init sock: %d, len: %d\n", InitSocket, length);
   BindSocket = accept (InitSocket, (struct sockaddr *) &Address_in, &length);
-  if (DEBUG) fprintf (stderr, "bind sock: %d\n", BindSocket);
+  if (DEBUG) gprint (GP_ERR, "bind sock: %d\n", BindSocket);
   if (BindSocket == -1) {
     perror ("accept: ");
@@ -84,10 +84,10 @@
   addr = Address_in.sin_addr.s_addr;
   if (DEBUG) {
-    fprintf (stderr, "incoming connection from: ");
-    fprintf (stderr, " %u", (0xff & (addr >>  0)));
-    fprintf (stderr, ".%u", (0xff & (addr >>  8)));
-    fprintf (stderr, ".%u", (0xff & (addr >> 16)));
-    fprintf (stderr, ".%u", (0xff & (addr >> 24)));
-    fprintf (stderr, "\n");
+    gprint (GP_ERR, "incoming connection from: ");
+    gprint (GP_ERR, " %u", (0xff & (addr >>  0)));
+    gprint (GP_ERR, ".%u", (0xff & (addr >>  8)));
+    gprint (GP_ERR, ".%u", (0xff & (addr >> 16)));
+    gprint (GP_ERR, ".%u", (0xff & (addr >> 24)));
+    gprint (GP_ERR, "\n");
   }
 
@@ -109,10 +109,10 @@
   }
 
-  if (DEBUG) fprintf (stderr, "connection rejected\n");
+  if (DEBUG) gprint (GP_ERR, "connection rejected\n");
   close (BindSocket);
   return (-1);
 
 accepted:
-  if (DEBUG) fprintf (stderr, "connection accepted\n");
+  if (DEBUG) gprint (GP_ERR, "connection accepted\n");
   fcntl (BindSocket, F_SETFL, O_NONBLOCK); 
   return (BindSocket);
@@ -135,5 +135,5 @@
 
   if (DEBUG) {
-    fprintf (stderr, "trying %s (%s:%d)...", host[0].h_name, hostip, MY_PORT);
+    gprint (GP_ERR, "trying %s (%s:%d)...", host[0].h_name, hostip, MY_PORT);
   }
 
@@ -142,5 +142,5 @@
   status = inet_aton (hostip, &Address.sin_addr);
   if (!status) {
-    fprintf (stderr, "invalid address\n");
+    gprint (GP_ERR, "invalid address\n");
     exit (2);
   }
@@ -160,5 +160,5 @@
   }
 
-  if (DEBUG) fprintf (stderr, "connected\n");
+  if (DEBUG) gprint (GP_ERR, "connected\n");
   fcntl (InitSocket, F_SETFL, O_NONBLOCK); 
   return (InitSocket);
@@ -183,5 +183,5 @@
   status = inet_aton (hostip, &Address[0].sin_addr);
   if (!status) {
-    fprintf (stderr, "invalid address\n");
+    gprint (GP_ERR, "invalid address\n");
     exit (2);
   }
@@ -195,5 +195,5 @@
   }
 
-  if (DEBUG) fprintf (stderr, "init sock: %d, len: %d\n", InitSocket, length);
+  if (DEBUG) gprint (GP_ERR, "init sock: %d, len: %d\n", InitSocket, length);
   status = bind (InitSocket, (struct sockaddr *) Address, length);
   if (status == -1) {
@@ -208,5 +208,5 @@
   }
 
-  if (DEBUG) fprintf (stderr, "socket listening on %s (%s:%d)\n", host[0].h_name, hostip, MY_PORT);
+  if (DEBUG) gprint (GP_ERR, "socket listening on %s (%s:%d)\n", host[0].h_name, hostip, MY_PORT);
   return (InitSocket);
 }
@@ -230,5 +230,5 @@
     test &= ((ip4 >=0) && (ip4 < 256)); 
     if (!test) {
-      fprintf (stderr, "invalid IP address %s\n", string);
+      gprint (GP_ERR, "invalid IP address %s\n", string);
       exit (2);
     }
