diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network.c | 6 | ||||
-rw-r--r-- | src/sync-mode.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/network.c b/src/network.c index 04c9d39..78be1e2 100644 --- a/src/network.c +++ b/src/network.c @@ -85,12 +85,12 @@ static char *tx_buf; #define HEADERSIZ 28 /* IP header (20 bytes) + UDP header 8 (bytes) */ -int mcast_buffered_init(struct mcast_conf *mconf) +int mcast_buffered_init(int if_mtu) { - int mtu = mconf->mtu - HEADERSIZ; + int mtu = if_mtu - HEADERSIZ; /* default to Ethernet MTU 1500 bytes */ - if (mconf->mtu == 0) + if (if_mtu == 0) mtu = 1500 - HEADERSIZ; tx_buf = malloc(mtu); diff --git a/src/sync-mode.c b/src/sync-mode.c index e613111..98867b2 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -233,7 +233,7 @@ static int init_sync(void) dlog(LOG_NOTICE, "multicast client socket sender queue " "has been set to %d bytes", CONFIG(mcast).sndbuf); - if (mcast_buffered_init(&CONFIG(mcast)) == -1) { + if (mcast_buffered_init(CONFIG(mcast).mtu) == -1) { dlog(LOG_ERR, "can't init tx buffer!"); mcast_server_destroy(STATE_SYNC(mcast_server)); mcast_client_destroy(STATE_SYNC(mcast_client)); |