aboutsummaryrefslogtreecommitdiff
path: root/src/core/gnunet-service-core.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-12-23 22:21:40 +0000
committerChristian Grothoff <christian@grothoff.org>2010-12-23 22:21:40 +0000
commit2a666baaa36c3a78e9a263f381b4a9f52f29e21f (patch)
tree681f981d4d0e59839b5d65c11256020df999961d /src/core/gnunet-service-core.c
parent789f12e913e092518054ac1fd5caa7f39790bafa (diff)
downloadgnunet-2a666baaa36c3a78e9a263f381b4a9f52f29e21f.tar.gz
gnunet-2a666baaa36c3a78e9a263f381b4a9f52f29e21f.zip
stats
Diffstat (limited to 'src/core/gnunet-service-core.c')
-rw-r--r--src/core/gnunet-service-core.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index ea431473c..93e041056 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -1886,7 +1886,9 @@ consider_free_neighbour (struct Neighbour *n)
1886 * @return number of bytes transmitted 1886 * @return number of bytes transmitted
1887 */ 1887 */
1888static size_t 1888static size_t
1889notify_encrypted_transmit_ready (void *cls, size_t size, void *buf) 1889notify_encrypted_transmit_ready (void *cls,
1890 size_t size,
1891 void *buf)
1890{ 1892{
1891 struct Neighbour *n = cls; 1893 struct Neighbour *n = cls;
1892 struct MessageEntry *m; 1894 struct MessageEntry *m;
@@ -1936,6 +1938,10 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
1936 } 1938 }
1937 GNUNET_free (m); 1939 GNUNET_free (m);
1938 consider_free_neighbour (n); 1940 consider_free_neighbour (n);
1941 GNUNET_STATISTICS_update (stats,
1942 gettext_noop ("# encrypted bytes given to transport"),
1943 ret,
1944 GNUNET_NO);
1939 return ret; 1945 return ret;
1940} 1946}
1941 1947
@@ -2038,7 +2044,10 @@ do_decrypt (struct Neighbour *n,
2038 GNUNET_break (0); 2044 GNUNET_break (0);
2039 return GNUNET_SYSERR; 2045 return GNUNET_SYSERR;
2040 } 2046 }
2041 GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes decrypted"), size, GNUNET_NO); 2047 GNUNET_STATISTICS_update (stats,
2048 gettext_noop ("# bytes decrypted"),
2049 size,
2050 GNUNET_NO);
2042#if DEBUG_CORE 2051#if DEBUG_CORE
2043 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2052 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2044 "Decrypted %u bytes from `%4s' using key %u, IV %u\n", 2053 "Decrypted %u bytes from `%4s' using key %u, IV %u\n",
@@ -2876,7 +2885,9 @@ handle_client_send (void *cls,
2876 * @return number of bytes transmitted 2885 * @return number of bytes transmitted
2877 */ 2886 */
2878static size_t 2887static size_t
2879notify_transport_connect_done (void *cls, size_t size, void *buf) 2888notify_transport_connect_done (void *cls,
2889 size_t size,
2890 void *buf)
2880{ 2891{
2881 struct Neighbour *n = cls; 2892 struct Neighbour *n = cls;
2882 2893
@@ -2886,8 +2897,13 @@ notify_transport_connect_done (void *cls, size_t size, void *buf)
2886 /* transport should only call us to transmit a message after 2897 /* transport should only call us to transmit a message after
2887 * telling us about a successful connection to the respective peer */ 2898 * telling us about a successful connection to the respective peer */
2888#if DEBUG_CORE 2899#if DEBUG_CORE
2889 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Timeout on notify connect!\n"); 2900 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2901 "Timeout on notify connect!\n");
2890#endif 2902#endif
2903 GNUNET_STATISTICS_update (stats,
2904 gettext_noop ("# connection requests timed out in transport"),
2905 1,
2906 GNUNET_NO);
2891 return 0; 2907 return 0;
2892 } 2908 }
2893 if (buf == NULL) 2909 if (buf == NULL)