Hi Arron,

I would like to say NAK to this patch and the dnsproxy one also. I think we want to get information about these events and not hide them behind debug switch. Your -q option patch would suit perhaps you better if you want to avoid all printing.

Cheers,
Jukka


On 11/07/2011 08:33 AM, Yu A Wang wrote:
---
  src/ipconfig.c |   30 +++++++++++++-----------------
  1 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/ipconfig.c b/src/ipconfig.c
index da61446..e149025 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -493,7 +493,7 @@ int __connman_ipconfig_set_rp_filter()

        set_rp_filter(2);

-       connman_info("rp_filter set to 2 (loose mode routing), "
+       DBG("rp_filter set to 2 (loose mode routing), "
                        "old value was %d", value);

        return value;
@@ -503,15 +503,14 @@ void __connman_ipconfig_unset_rp_filter(int old_value)
  {
        set_rp_filter(old_value);

-       connman_info("rp_filter restored to %d", old_value);
+       DBG("rp_filter restored to %d", old_value);
  }

  static void free_ipdevice(gpointer data)
  {
        struct connman_ipdevice *ipdevice = data;

-       connman_info("%s {remove} index %d", ipdevice->ifname,
-                                                       ipdevice->index);
+       DBG("%s {remove} index %d", ipdevice->ifname, ipdevice->index);

        if (ipdevice->config_ipv4 != NULL) {
                connman_ipconfig_unref(ipdevice->config_ipv4);
@@ -566,9 +565,9 @@ static void update_stats(struct connman_ipdevice *ipdevice,
        if (stats->rx_packets == 0&&  stats->tx_packets == 0)
                return;

-       connman_info("%s {RX} %u packets %u bytes", ipdevice->ifname,
+       DBG("%s {RX} %u packets %u bytes", ipdevice->ifname,
                                        stats->rx_packets, stats->rx_bytes);
-       connman_info("%s {TX} %u packets %u bytes", ipdevice->ifname,
+       DBG("%s {TX} %u packets %u bytes", ipdevice->ifname,
                                        stats->tx_packets, stats->tx_bytes);

        if (ipdevice->config_ipv4 == NULL&&  ipdevice->config_ipv6 == NULL)
@@ -635,7 +634,7 @@ void __connman_ipconfig_newlink(int index, unsigned short 
type,

        g_hash_table_insert(ipdevice_hash, GINT_TO_POINTER(index), ipdevice);

-       connman_info("%s {create} index %d type %d<%s>", ipdevice->ifname,
+       DBG("%s {create} index %d type %d<%s>", ipdevice->ifname,
                                                index, type, type2str(type));

  update:
@@ -679,8 +678,7 @@ update:
        if (flags&  IFF_LOWER_UP)
                g_string_append(str, ",LOWER_UP");

-       connman_info("%s {update} flags %u<%s>", ipdevice->ifname,
-                                                       flags, str->str);
+       DBG("%s {update} flags %u<%s>", ipdevice->ifname, flags, str->str);

        g_string_free(str, TRUE);

@@ -795,7 +793,7 @@ void __connman_ipconfig_newaddr(int index, int family, 
const char *label,
        ipdevice->address_list = g_slist_append(ipdevice->address_list,
                                                                ipaddress);

-       connman_info("%s {add} address %s/%u label %s family %d",
+       DBG("%s {add} address %s/%u label %s family %d",
                ipdevice->ifname, address, prefixlen, label, family);

        if (ipdevice->config_ipv4 != NULL&&  family == AF_INET)
@@ -860,7 +858,7 @@ void __connman_ipconfig_deladdr(int index, int family, 
const char *label,
        connman_ipaddress_clear(ipaddress);
        g_free(ipaddress);

-       connman_info("%s {del} address %s/%u label %s", ipdevice->ifname,
+       DBG("%s {del} address %s/%u label %s", ipdevice->ifname,
                                                address, prefixlen, label);

        if ((ipdevice->flags&  (IFF_RUNNING | IFF_LOWER_UP)) != (IFF_RUNNING | 
IFF_LOWER_UP))
@@ -954,9 +952,8 @@ void __connman_ipconfig_newroute(int index, int family, 
unsigned char scope,
                }
        }

-       connman_info("%s {add} route %s gw %s scope %u<%s>",
-                                       ipdevice->ifname, dst, gateway,
-                                               scope, scope2str(scope));
+       DBG("%s {add} route %s gw %s scope %u<%s>", ipdevice->ifname, dst,
+                                       gateway, scope, scope2str(scope));
  }

  void __connman_ipconfig_delroute(int index, int family, unsigned char scope,
@@ -1024,9 +1021,8 @@ void __connman_ipconfig_delroute(int index, int family, 
unsigned char scope,
                }
        }

-       connman_info("%s {del} route %s gw %s scope %u<%s>",
-                                       ipdevice->ifname, dst, gateway,
-                                               scope, scope2str(scope));
+       DBG("%s {del} route %s gw %s scope %u<%s>", ipdevice->ifname, dst,
+                                       gateway, scope, scope2str(scope));
  }

  void __connman_ipconfig_foreach(void (*function) (int index, void *user_data),

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to