From fe2615590d5e8ac8e735200696ec8396fb3cd219 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 11 Mar 2011 19:45:54 -0800 Subject: inet_diag: force the use of 32-bit counters 64-bit counters are unnecessarily large for tracking active or queued connections until we have IP_ROFLSCALE support :> --- ext/raindrops/linux_inet_diag.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_diag.c index 540c823..0eff08d 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -47,8 +47,8 @@ static unsigned g_seq; static VALUE cListenStats; struct listen_stats { - unsigned long active; - unsigned long queued; + uint32_t active; + uint32_t queued; }; #define OPLEN (sizeof(struct inet_diag_bc_op) + \ @@ -63,8 +63,8 @@ struct nogvl_args { /* creates a Ruby ListenStats Struct based on our internal listen_stats */ static VALUE rb_listen_stats(struct listen_stats *stats) { - VALUE active = ULONG2NUM(stats->active); - VALUE queued = ULONG2NUM(stats->queued); + VALUE active = UINT2NUM(stats->active); + VALUE queued = UINT2NUM(stats->queued); return rb_struct_new(cListenStats, active, queued); } -- cgit v1.2.3-24-ge0c7