summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp_broadcasting.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-12-05 10:41:13 +0000
committerBart Polot <bart@net.in.tum.de>2013-12-05 10:41:13 +0000
commitd8c56c79613f603765984a9a8fc2ed9036bdd2e6 (patch)
treed0b5983fc37126b4575453bc6d9f7de5c271d7b0 /src/transport/plugin_transport_udp_broadcasting.c
parentc015c4ba3cd0733d628df63f9d2e4d2a04247c52 (diff)
- fix compilation issues
Diffstat (limited to 'src/transport/plugin_transport_udp_broadcasting.c')
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index b1b81f758..153259382 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -94,7 +94,7 @@ struct BroadcastAddress
/*
* Cryogenic fields
*/
- struct GNUNET_DISK_FileHandle cryogenic_fd;
+ struct GNUNET_DISK_FileHandle *cryogenic_fd;
struct pm_times cryogenic_times;
};
@@ -344,12 +344,12 @@ udp_ipv4_broadcast_send (void *cls,
/*
* Cryogenic
*/
- if (baddr->cryogenic_fd.fd > 0)
+ if (NULL != baddr->cryogenic_fd)
{
- baddr->cryogenic_times.delay_msecs = (plugin->broadcast_interval/1000.0)*0.5;
- baddr->cryogenic_times.timeout_msecs = (plugin->broadcast_interval/1000.0)*1.5;
+ baddr->cryogenic_times.delay_msecs = (plugin->broadcast_interval.rel_value_us/1000.0)*0.5;
+ baddr->cryogenic_times.timeout_msecs = (plugin->broadcast_interval.rel_value_us/1000.0)*1.5;
- if (ioctl(baddr->cryogenic_fd.fd,
+ if (ioctl(baddr->cryogenic_fd->fd,
PM_SET_DELAY_AND_TIMEOUT,
&baddr->cryogenic_times) < 0)
{
@@ -360,7 +360,7 @@ udp_ipv4_broadcast_send (void *cls,
}
else
GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL,
- &baddr->cryogenic_fd,
+ baddr->cryogenic_fd,
&udp_ipv4_broadcast_send,
baddr);
@@ -426,12 +426,12 @@ udp_ipv6_broadcast_send (void *cls,
/*
* Cryogenic
*/
- if (baddr->cryogenic_fd.fd > 0)
+ if (NULL != baddr->cryogenic_fd)
{
- baddr->cryogenic_times.delay_msecs = (plugin->broadcast_interval/1000.0)*0.5;
- baddr->cryogenic_times.timeout_msecs = (plugin->broadcast_interval/1000.0)*1.5;
+ baddr->cryogenic_times.delay_msecs = (plugin->broadcast_interval.rel_value_us/1000.0)*0.5;
+ baddr->cryogenic_times.timeout_msecs = (plugin->broadcast_interval.rel_value_us/1000.0)*1.5;
- if (ioctl(baddr->cryogenic_fd.fd,
+ if (ioctl(baddr->cryogenic_fd->fd,
PM_SET_DELAY_AND_TIMEOUT,
&baddr->cryogenic_times) < 0)
{
@@ -442,7 +442,7 @@ udp_ipv6_broadcast_send (void *cls,
}
else
GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL,
- &baddr->cryogenic_fd,
+ baddr->cryogenic_fd,
&udp_ipv4_broadcast_send,
baddr);
}
@@ -667,7 +667,7 @@ stop_broadcast (struct Plugin *plugin)
/*
* Close Cryogenic FD
*/
- GNUNET_DISK_file_cose(p->cryogenic_fd);
+ GNUNET_DISK_file_close(p->cryogenic_fd);
GNUNET_CONTAINER_DLL_remove (plugin->broadcast_head,
plugin->broadcast_tail, p);