diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-02-19 20:02:16 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-02-19 20:02:16 +0000 |
commit | fdc7ae12008b15e920f1a19ca76f6e30cc8d0976 (patch) | |
tree | 44331240dc7097e444dba530f24f192da98e7aa0 /src | |
parent | 77280c43f11c61db710f8844a7fc0e6c23ac6ea1 (diff) | |
download | gnunet-fdc7ae12008b15e920f1a19ca76f6e30cc8d0976.tar.gz gnunet-fdc7ae12008b15e920f1a19ca76f6e30cc8d0976.zip |
- reduce debug messages amount of hello operations
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh_peer.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index d6998c25d..5029df2ee 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c | |||
@@ -1881,23 +1881,23 @@ GMP_set_hello (struct MeshPeer *peer, const struct GNUNET_HELLO_Message *hello) | |||
1881 | struct GNUNET_HELLO_Message *old; | 1881 | struct GNUNET_HELLO_Message *old; |
1882 | size_t size; | 1882 | size_t size; |
1883 | 1883 | ||
1884 | LOG (GNUNET_ERROR_TYPE_DEBUG, "New hello for %s\n", GMP_2s (peer)); | 1884 | LOG (GNUNET_ERROR_TYPE_DEBUG, "set hello for %s\n", GMP_2s (peer)); |
1885 | if (NULL == hello) | 1885 | if (NULL == hello) |
1886 | return; | 1886 | return; |
1887 | 1887 | ||
1888 | old = GMP_get_hello (peer); | 1888 | old = GMP_get_hello (peer); |
1889 | LOG (GNUNET_ERROR_TYPE_DEBUG, " old hello %p\n", old); | ||
1890 | if (NULL == old) | 1889 | if (NULL == old) |
1891 | { | 1890 | { |
1892 | size = GNUNET_HELLO_size (hello); | 1891 | size = GNUNET_HELLO_size (hello); |
1893 | LOG (GNUNET_ERROR_TYPE_DEBUG, " new size: %u\n", size); | 1892 | LOG (GNUNET_ERROR_TYPE_DEBUG, " new (%u bytes)\n", size); |
1894 | peer->hello = GNUNET_malloc (size); | 1893 | peer->hello = GNUNET_malloc (size); |
1895 | memcpy (peer->hello, hello, size); | 1894 | memcpy (peer->hello, hello, size); |
1896 | } | 1895 | } |
1897 | else | 1896 | else |
1898 | { | 1897 | { |
1899 | peer->hello = GNUNET_HELLO_merge (old, hello); | 1898 | peer->hello = GNUNET_HELLO_merge (old, hello); |
1900 | LOG (GNUNET_ERROR_TYPE_DEBUG, " merge! %p\n", peer->hello); | 1899 | LOG (GNUNET_ERROR_TYPE_DEBUG, " merge into %p (%u bytes)\n", |
1900 | peer->hello, GNUNET_HELLO_size (hello)); | ||
1901 | GNUNET_free (old); | 1901 | GNUNET_free (old); |
1902 | } | 1902 | } |
1903 | } | 1903 | } |
@@ -1916,7 +1916,6 @@ GMP_get_hello (struct MeshPeer *peer) | |||
1916 | struct GNUNET_TIME_Absolute expiration; | 1916 | struct GNUNET_TIME_Absolute expiration; |
1917 | struct GNUNET_TIME_Relative remaining; | 1917 | struct GNUNET_TIME_Relative remaining; |
1918 | 1918 | ||
1919 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Get hello\n"); | ||
1920 | if (NULL == peer->hello) | 1919 | if (NULL == peer->hello) |
1921 | return NULL; | 1920 | return NULL; |
1922 | 1921 | ||
@@ -1924,7 +1923,7 @@ GMP_get_hello (struct MeshPeer *peer) | |||
1924 | remaining = GNUNET_TIME_absolute_get_remaining (expiration); | 1923 | remaining = GNUNET_TIME_absolute_get_remaining (expiration); |
1925 | if (0 == remaining.rel_value_us) | 1924 | if (0 == remaining.rel_value_us) |
1926 | { | 1925 | { |
1927 | LOG (GNUNET_ERROR_TYPE_DEBUG, " expired on %s\n", | 1926 | LOG (GNUNET_ERROR_TYPE_DEBUG, " get - hello expired on %s\n", |
1928 | GNUNET_STRINGS_absolute_time_to_string (expiration)); | 1927 | GNUNET_STRINGS_absolute_time_to_string (expiration)); |
1929 | GNUNET_free (peer->hello); | 1928 | GNUNET_free (peer->hello); |
1930 | peer->hello = NULL; | 1929 | peer->hello = NULL; |