summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 131eda6)
raw | patch | inline | side by side (parent: 131eda6)
author | Aman Gupta <aman@tmm1.net> | |
Sat, 29 Aug 2009 20:11:27 +0000 (22:11 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 29 Aug 2009 20:11:27 +0000 (22:11 +0200) |
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index 9f3cfd3ba1b66ca8b6f81f42519adf941dc2a87b..92271b786cd52dc5960c7cdf493a237177e1544f 100644 (file)
--- a/src/network.c
+++ b/src/network.c
static void network_init_buffer (void)
{
- memset (send_buffer, 0, sizeof (send_buffer));
+ memset (send_buffer, 0, network_config_packet_size);
send_buffer_ptr = send_buffer;
send_buffer_fill = 0;
pthread_mutex_lock (&send_buffer_lock);
status = add_to_buffer (send_buffer_ptr,
- sizeof (send_buffer) - (send_buffer_fill + BUFF_SIG_SIZE),
+ network_config_packet_size - (send_buffer_fill + BUFF_SIG_SIZE),
&send_buffer_vl,
ds, vl);
if (status >= 0)
flush_buffer ();
status = add_to_buffer (send_buffer_ptr,
- sizeof (send_buffer) - (send_buffer_fill + BUFF_SIG_SIZE),
+ network_config_packet_size - (send_buffer_fill + BUFF_SIG_SIZE),
&send_buffer_vl,
ds, vl);
ERROR ("network plugin: Unable to append to the "
"buffer for some weird reason");
}
- else if ((sizeof (send_buffer) - send_buffer_fill) < 15)
+ else if ((network_config_packet_size - send_buffer_fill) < 15)
{
flush_buffer ();
}