diff options
| author | Anush Shetty <anush@gluster.com> | 2010-05-11 03:06:31 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2010-05-11 10:10:11 -0700 | 
| commit | 5ff01302f737ab731d42c9d7b6d9137e29a90d46 (patch) | |
| tree | 7756fc01f2137746a59c869d76d3d26e70b7af72 /transport/socket/src/name.c | |
| parent | 03edd34d0854accfa5170548dfdb152ac13feba5 (diff) | |
Adding GF_LOG_OCCASIONALLY to prevent repeated log messages
Signed-off-by: Anush Shetty <anush@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 10 ([ glusterfs 2.0.0 ] - Repeated Log messages with invalid remote-host in protocol/client)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=10
Diffstat (limited to 'transport/socket/src/name.c')
| -rw-r--r-- | transport/socket/src/name.c | 17 | 
1 files changed, 10 insertions, 7 deletions
diff --git a/transport/socket/src/name.c b/transport/socket/src/name.c index 120a669c87b..ce78b8e3a86 100644 --- a/transport/socket/src/name.c +++ b/transport/socket/src/name.c @@ -34,6 +34,8 @@  #define AF_INET_SDP 27  #endif +static int gf_name_addr_enotspec_log; +  #include "transport.h"  #include "socket.h" @@ -139,13 +141,14 @@ client_fill_address_family (transport_t *this, sa_family_t *sa_family)                  if (!(remote_host_data || connect_path_data) ||                       (remote_host_data && connect_path_data)) { -                        gf_log (this->xl->name, GF_LOG_ERROR, -                                "transport.address-family not specified and " -                                "not able to determine the " -                                "same from other options (remote-host:%s and " -                                "transport.unix.connect-path:%s)",  -                                data_to_str (remote_host_data),  -                                data_to_str (connect_path_data)); +		        GF_LOG_OCCASIONALLY (gf_name_addr_enotspec_log, +					     this->xl->name, GF_LOG_ERROR, +					     "transport.address-family not specified and " +					     "not able to determine the " +					     "same from other options (remote-host:%s and " +					     "transport.unix.connect-path:%s)",  +					     data_to_str (remote_host_data),  +					     data_to_str (connect_path_data));                          goto out;                  }   | 
