make network rings larger

From: MAAAAA MOOOR <huaraz@btinternet.com>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13941 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2004-06-20 17:01:28 +00:00
parent a69172cd39
commit 45025e58d9

View File

@@ -36,7 +36,8 @@
RCSID("$Id$");
Ring netoring, netiring;
unsigned char netobuf[2*BUFSIZ], netibuf[BUFSIZ];
size_t netobufsize = 64*1024;
size_t netibufsize = 64*1024;
/*
* Initialize internal network data structures.
@@ -45,10 +46,17 @@ unsigned char netobuf[2*BUFSIZ], netibuf[BUFSIZ];
void
init_network(void)
{
if (ring_init(&netoring, netobuf, sizeof netobuf) != 1) {
void *obuf, *ibuf;
if ((obuf = malloc(netobufsize)) == NULL)
exit(1);
if ((ibuf = malloc(netibufsize)) == NULL)
exit(1);
if (ring_init(&netoring, obuf, netobufsize) != 1) {
exit(1);
}
if (ring_init(&netiring, netibuf, sizeof netibuf) != 1) {
if (ring_init(&netiring, ibuf, netibufsize) != 1) {
exit(1);
}
NetTrace = stdout;