View Issue Details

IDProjectCategoryView StatusLast Update
0003960unrealircdpublic2012-08-17 10:53
Reporterdarkex Assigned Tosyzop  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in Version3.2.10-rc1 
Summary0003960: Ping timeout count on client exit
DescriptionAs of lately I've seen most IRCd's use the "Ping timeout: XXX seconds" format instead of just "Ping timeout".

So I think Unreal should catch up to the other IRCds and implement this small feature. It's useful in determining lag as well as knowing the ping threshold.

So, I've decided to include a .diff file for this change. I stole 90% of this code from hybrid-ircd. :>

Any constructive comments welcome.
TagsNo tags attached.
Attached Files
pingcounter.diff (715 bytes)
3rd party modules

Activities

Bock

2010-09-22 19:12

reporter   ~0016379

We use this diff:
+ char scratch[32];
     int ping = 0;
 
     for (i = 0; i <= LastSlot; i++) {
@@ -700,7 +701,9 @@
                     Debug((DEBUG_DEBUG, "ssl accept handshake timeout: %s (%li-%li > %li)", cptr->sockhost,
                         currenttime, cptr->since, ping));
 #endif
- exit_client(cptr, cptr, &me, "Ping timeout");
+ ircsprintf(scratch, "Ping timeout: %d seconds",
+ (int)(TStime() - cptr->lasttime));
+ exit_client(cptr, cptr, &me, scratch);
                 continue;
                 
             }


Nice idea, I like it.

syzop

2010-11-15 17:53

administrator   ~0016416

*test the new 'has patch' state in mantis which I added*

nenotopia

2010-11-21 05:52

reporter   ~0016440

hmmph, this patch should really use ircsnprintf() in order to prevent buffer overflow.

syzop

2012-08-17 10:49

administrator   ~0017072

Last edited: 2012-08-17 10:53

- Show "Ping timeout: XYZ seconds" instead of just "Ping timeout".
  Patch from darkex (0003960).

Added, took a while I guess ;p. Thanks!

http://hg.unrealircd.com/hg/unreal/rev/6ffa8616a5a7
EDIT: added http://hg.unrealircd.com/hg/unreal/rev/480e16958832

Issue History

Date Modified Username Field Change
2010-09-21 11:51 darkex New Issue
2010-09-21 11:51 darkex File Added: pingcounter.diff
2010-09-22 19:12 Bock Note Added: 0016379
2010-11-15 17:53 syzop Note Added: 0016416
2010-11-15 17:53 syzop Assigned To => syzop
2010-11-15 17:53 syzop Status new => has patch
2010-11-15 17:59 syzop Assigned To syzop =>
2010-11-21 05:52 nenotopia Note Added: 0016440
2012-08-17 10:49 syzop Note Added: 0017072
2012-08-17 10:49 syzop Status has patch => resolved
2012-08-17 10:49 syzop Fixed in Version => 3.2.10-rc1
2012-08-17 10:49 syzop Resolution open => fixed
2012-08-17 10:49 syzop Assigned To => syzop
2012-08-17 10:50 syzop Note Edited: 0017072
2012-08-17 10:53 syzop Note Edited: 0017072