diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-22 21:05:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-22 21:05:05 +0000 |
commit | bb3a667f083cc2b5cab9b9c42d466041f15412a7 (patch) | |
tree | c5a9f564dde4eccd365fd26272b996abf1b9bccc /src/core/gnunet-service-core_typemap.c | |
parent | 8215a566377fffdf1737306f6e0664ae1a27bf01 (diff) | |
download | gnunet-bb3a667f083cc2b5cab9b9c42d466041f15412a7.tar.gz gnunet-bb3a667f083cc2b5cab9b9c42d466041f15412a7.zip |
add typemap retransmission code
Diffstat (limited to 'src/core/gnunet-service-core_typemap.c')
-rw-r--r-- | src/core/gnunet-service-core_typemap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/gnunet-service-core_typemap.c b/src/core/gnunet-service-core_typemap.c index e60f99ed6..e4f75bd00 100644 --- a/src/core/gnunet-service-core_typemap.c +++ b/src/core/gnunet-service-core_typemap.c | |||
@@ -107,6 +107,10 @@ GSC_TYPEMAP_get_from_message (const struct GNUNET_MessageHeader *msg) | |||
107 | switch (ntohs (msg->type)) | 107 | switch (ntohs (msg->type)) |
108 | { | 108 | { |
109 | case GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP: | 109 | case GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP: |
110 | GNUNET_STATISTICS_update (GSC_stats, | ||
111 | gettext_noop ("# type maps received"), | ||
112 | 1, | ||
113 | GNUNET_NO); | ||
110 | if (size != sizeof (struct GSC_TypeMap)) | 114 | if (size != sizeof (struct GSC_TypeMap)) |
111 | { | 115 | { |
112 | GNUNET_break_op (0); | 116 | GNUNET_break_op (0); |
@@ -116,6 +120,10 @@ GSC_TYPEMAP_get_from_message (const struct GNUNET_MessageHeader *msg) | |||
116 | memcpy (ret, &msg[1], sizeof (struct GSC_TypeMap)); | 120 | memcpy (ret, &msg[1], sizeof (struct GSC_TypeMap)); |
117 | return ret; | 121 | return ret; |
118 | case GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP: | 122 | case GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP: |
123 | GNUNET_STATISTICS_update (GSC_stats, | ||
124 | gettext_noop ("# type maps received"), | ||
125 | 1, | ||
126 | GNUNET_NO); | ||
119 | ret = GNUNET_malloc (sizeof (struct GSC_TypeMap)); | 127 | ret = GNUNET_malloc (sizeof (struct GSC_TypeMap)); |
120 | dlen = sizeof (struct GSC_TypeMap); | 128 | dlen = sizeof (struct GSC_TypeMap); |
121 | if ( (Z_OK != | 129 | if ( (Z_OK != |
@@ -144,6 +152,10 @@ broadcast_my_type_map () | |||
144 | struct GNUNET_MessageHeader *hdr; | 152 | struct GNUNET_MessageHeader *hdr; |
145 | 153 | ||
146 | hdr = GSC_TYPEMAP_compute_type_map_message (); | 154 | hdr = GSC_TYPEMAP_compute_type_map_message (); |
155 | GNUNET_STATISTICS_update (GSC_stats, | ||
156 | gettext_noop ("# updates to my type map"), | ||
157 | 1, | ||
158 | GNUNET_NO); | ||
147 | GSC_SESSIONS_broadcast (hdr); | 159 | GSC_SESSIONS_broadcast (hdr); |
148 | GNUNET_free (hdr); | 160 | GNUNET_free (hdr); |
149 | } | 161 | } |