raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] fix ListenStats documentation error in Raindrops::Linux.unix_listener_stats
@ 2012-01-07  7:48 Aman Gupta
  2012-01-07  7:48 ` [PATCH] avoid calling tcp_listener_stats when it is not available Aman Gupta
  0 siblings, 1 reply; 3+ messages in thread
From: Aman Gupta @ 2012-01-07  7:48 UTC (permalink / raw)
  To: raindrops

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 lib/raindrops/linux.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/raindrops/linux.rb b/lib/raindrops/linux.rb
index 8a67887..fe2af09 100644
--- a/lib/raindrops/linux.rb
+++ b/lib/raindrops/linux.rb
@@ -27,8 +27,8 @@ module Raindrops::Linux
   #             SS_CONNECTED,             /* connected to socket          */
   #             SS_DISCONNECTING          /* in process of disconnecting  */
   #     } socket_state;
-  # * SS_CONNECTING maps to ListenStats#active
-  # * SS_CONNECTED maps to ListenStats#queued
+  # * SS_CONNECTING maps to ListenStats#queued
+  # * SS_CONNECTED maps to ListenStats#active
   #
   # This method may be significantly slower than its tcp_listener_stats
   # counterpart due to the latter being able to use inet_diag via netlink.
-- 
1.7.5.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] avoid calling tcp_listener_stats when it is not available
  2012-01-07  7:48 [PATCH] fix ListenStats documentation error in Raindrops::Linux.unix_listener_stats Aman Gupta
@ 2012-01-07  7:48 ` Aman Gupta
  2012-01-07  8:05   ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Aman Gupta @ 2012-01-07  7:48 UTC (permalink / raw)
  To: raindrops

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 lib/raindrops/middleware.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/raindrops/middleware.rb b/lib/raindrops/middleware.rb
index a411de7..7c647ec 100644
--- a/lib/raindrops/middleware.rb
+++ b/lib/raindrops/middleware.rb
@@ -130,7 +130,7 @@ class Raindrops::Middleware
     body = "calling: #{@stats.calling}\n" \
            "writing: #{@stats.writing}\n"
 
-    if defined?(Raindrops::Linux)
+    if defined?(Raindrops::Linux.tcp_listener_stats)
       Raindrops::Linux.tcp_listener_stats(@tcp).each do |addr,stats|
         body << "#{addr} active: #{stats.active}\n" \
                 "#{addr} queued: #{stats.queued}\n"
-- 
1.7.5.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] avoid calling tcp_listener_stats when it is not available
  2012-01-07  7:48 ` [PATCH] avoid calling tcp_listener_stats when it is not available Aman Gupta
@ 2012-01-07  8:05   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2012-01-07  8:05 UTC (permalink / raw)
  To: raindrops

Aman Gupta <aman@tmm1.net> wrote:
> Signed-off-by: Aman Gupta <aman@tmm1.net>

Thanks, both patched acked and pushed out to "master" on
git://bogomips.org/raindrops.git and rdoc update pushed to
http://raindrops.bogomips.org/ too


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-07  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-07  7:48 [PATCH] fix ListenStats documentation error in Raindrops::Linux.unix_listener_stats Aman Gupta
2012-01-07  7:48 ` [PATCH] avoid calling tcp_listener_stats when it is not available Aman Gupta
2012-01-07  8:05   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/raindrops.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).