diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-13 13:00:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-13 13:00:14 +0000 |
commit | 5e900316b0b70bb65f573d0ad110f3d93551b11b (patch) | |
tree | e78e9d55d8c5da7272acc472c2e8441458e6f84c /src/dv/plugin_transport_dv.c | |
parent | 280ca97ba6c2df197a0e6a3ca5b6cb9da0df9ec2 (diff) | |
download | gnunet-5e900316b0b70bb65f573d0ad110f3d93551b11b.tar.gz gnunet-5e900316b0b70bb65f573d0ad110f3d93551b11b.zip |
use enum GNUNET_ATS_Network_Type instead of uint32_t where appropriate
Diffstat (limited to 'src/dv/plugin_transport_dv.c')
-rw-r--r-- | src/dv/plugin_transport_dv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index eca888731..8e9ec9d53 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c | |||
@@ -126,7 +126,7 @@ struct Session | |||
126 | /** | 126 | /** |
127 | * Current network the next hop peer is located in | 127 | * Current network the next hop peer is located in |
128 | */ | 128 | */ |
129 | uint32_t network; | 129 | enum GNUNET_ATS_Network_Type network; |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * Does the transport service know about this session (and we thus | 132 | * Does the transport service know about this session (and we thus |
@@ -290,7 +290,8 @@ handle_dv_message_received (void *cls, | |||
290 | static void | 290 | static void |
291 | handle_dv_connect (void *cls, | 291 | handle_dv_connect (void *cls, |
292 | const struct GNUNET_PeerIdentity *peer, | 292 | const struct GNUNET_PeerIdentity *peer, |
293 | uint32_t distance, uint32_t network) | 293 | uint32_t distance, |
294 | enum GNUNET_ATS_Network_Type network) | ||
294 | { | 295 | { |
295 | struct Plugin *plugin = cls; | 296 | struct Plugin *plugin = cls; |
296 | struct Session *session; | 297 | struct Session *session; |
@@ -336,7 +337,7 @@ handle_dv_connect (void *cls, | |||
336 | ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); | 337 | ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
337 | ats[0].value = htonl (distance); | 338 | ats[0].value = htonl (distance); |
338 | ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); | 339 | ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); |
339 | ats[1].value = htonl (network); | 340 | ats[1].value = htonl ((uint32_t) network); |
340 | session->active = GNUNET_YES; | 341 | session->active = GNUNET_YES; |
341 | plugin->env->session_start (plugin->env->cls, peer, | 342 | plugin->env->session_start (plugin->env->cls, peer, |
342 | PLUGIN_NAME, | 343 | PLUGIN_NAME, |
@@ -357,7 +358,7 @@ static void | |||
357 | handle_dv_distance_changed (void *cls, | 358 | handle_dv_distance_changed (void *cls, |
358 | const struct GNUNET_PeerIdentity *peer, | 359 | const struct GNUNET_PeerIdentity *peer, |
359 | uint32_t distance, | 360 | uint32_t distance, |
360 | uint32_t network) | 361 | enum GNUNET_ATS_Network_Type network) |
361 | { | 362 | { |
362 | struct Plugin *plugin = cls; | 363 | struct Plugin *plugin = cls; |
363 | struct Session *session; | 364 | struct Session *session; |