diff options
Diffstat (limited to 'src/ats/gnunet-service-ats_performance.c')
-rw-r--r-- | src/ats/gnunet-service-ats_performance.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c index 3a4acc641..103040ea8 100644 --- a/src/ats/gnunet-service-ats_performance.c +++ b/src/ats/gnunet-service-ats_performance.c | |||
@@ -151,7 +151,7 @@ void | |||
151 | GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | 151 | GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, |
152 | const char *plugin_name, | 152 | const char *plugin_name, |
153 | const void *plugin_addr, size_t plugin_addr_len, | 153 | const void *plugin_addr, size_t plugin_addr_len, |
154 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 154 | const struct GNUNET_ATS_Information *atsi, |
155 | uint32_t atsi_count, | 155 | uint32_t atsi_count, |
156 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 156 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
157 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) | 157 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
@@ -159,14 +159,14 @@ GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | |||
159 | struct PerformanceClient *pc; | 159 | struct PerformanceClient *pc; |
160 | struct PeerInformationMessage *msg; | 160 | struct PeerInformationMessage *msg; |
161 | size_t plugin_name_length = strlen (plugin_name) + 1; | 161 | size_t plugin_name_length = strlen (plugin_name) + 1; |
162 | size_t msize = sizeof (struct PeerInformationMessage) + atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) | 162 | size_t msize = sizeof (struct PeerInformationMessage) + atsi_count * sizeof (struct GNUNET_ATS_Information) |
163 | + plugin_addr_len + plugin_name_length; | 163 | + plugin_addr_len + plugin_name_length; |
164 | char buf[msize]; | 164 | char buf[msize]; |
165 | struct GNUNET_TRANSPORT_ATS_Information *atsp; | 165 | struct GNUNET_ATS_Information *atsp; |
166 | char *addrp; | 166 | char *addrp; |
167 | 167 | ||
168 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); | 168 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); |
169 | GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 169 | GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)); |
170 | msg = (struct PeerInformationMessage*) buf; | 170 | msg = (struct PeerInformationMessage*) buf; |
171 | msg->header.size = htons (msize); | 171 | msg->header.size = htons (msize); |
172 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION); | 172 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION); |
@@ -176,8 +176,8 @@ GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | |||
176 | msg->plugin_name_length = htons (plugin_name_length); | 176 | msg->plugin_name_length = htons (plugin_name_length); |
177 | msg->bandwidth_out = bandwidth_out; | 177 | msg->bandwidth_out = bandwidth_out; |
178 | msg->bandwidth_in = bandwidth_in; | 178 | msg->bandwidth_in = bandwidth_in; |
179 | atsp = (struct GNUNET_TRANSPORT_ATS_Information* ) &msg[1]; | 179 | atsp = (struct GNUNET_ATS_Information* ) &msg[1]; |
180 | memcpy (atsp, atsi, sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); | 180 | memcpy (atsp, atsi, sizeof (struct GNUNET_ATS_Information) * atsi_count); |
181 | addrp = (char*) &atsp[atsi_count]; | 181 | addrp = (char*) &atsp[atsi_count]; |
182 | memcpy (addrp, plugin_addr, plugin_addr_len); | 182 | memcpy (addrp, plugin_addr, plugin_addr_len); |
183 | strcpy (&addrp[plugin_addr_len], plugin_name); | 183 | strcpy (&addrp[plugin_addr_len], plugin_name); |