Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] Re: (PR#10518) hostname and ping times are not always show
Home

[Freeciv-Dev] Re: (PR#10518) hostname and ping times are not always show

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: awaris@xxxxxxxxx, per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10518) hostname and ping times are not always shown
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Oct 2004 12:00:29 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10518 >

Mike Kaufman wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10518 >
> 
> On Tue, Oct 19, 2004 at 11:47:38AM -0700, Jason Short wrote:
> 
>>This is probably a bug in the server.  But I have little idea where.
> 
> 
> the bug is most likely in connecthand.c. When the conn_info stuff for
> gtk2 was being put together we found some bugs here, but I thought we had
> them fixed. I'll look at it tonight.

This patch was useful for me in debugging.

jason

Index: client/text.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/text.c,v
retrieving revision 1.13
diff -u -r1.13 text.c
--- client/text.c       18 Oct 2004 22:40:02 -0000      1.13
+++ client/text.c       19 Oct 2004 18:59:25 -0000
@@ -661,6 +661,14 @@
 {
   INIT;
 
+  freelog(LOG_NORMAL, "get_ping_time_text for %s.", pplayer->name);
+  freelog(LOG_NORMAL, "Connections: %d.",
+         conn_list_size(&pplayer->connections));
+  if (conn_list_size(&pplayer->connections) > 0) {
+    freelog(LOG_NORMAL, "Ping: %f",
+           conn_list_get(&pplayer->connections, 0)->ping_time);
+  }
+
   if (conn_list_size(&pplayer->connections) > 0
       && conn_list_get(&pplayer->connections, 0)->ping_time != -1.0) {
     double ping_time_in_ms =
@@ -670,6 +678,8 @@
        ((int) (ping_time_in_ms * 100.0)) % 100);
   }
 
+  freelog(LOG_NORMAL, "Output: '%s'", out);
+
   RETURN;
 }
 

[Prev in Thread] Current Thread [Next in Thread]