summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/ppp/pppd/plugins/minconn.c
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2003-04-24 07:15:38 +0000
committerMystery Man <unknown@mandriva.org>2003-04-24 07:15:38 +0000
commit87ef78ed082f9dec4e83a6120b32617b7f7a86b9 (patch)
treeb96ceedd4f1c29745a0651880e71daab8cdb686c /mdk-stage1/ppp/pppd/plugins/minconn.c
parent327bd24f8e4291bd1882de1990dd7339f781a9cb (diff)
downloaddrakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar.gz
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar.bz2
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar.xz
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_9_56mdk'.V1_1_9_56mdk
Diffstat (limited to 'mdk-stage1/ppp/pppd/plugins/minconn.c')
-rw-r--r--mdk-stage1/ppp/pppd/plugins/minconn.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/mdk-stage1/ppp/pppd/plugins/minconn.c b/mdk-stage1/ppp/pppd/plugins/minconn.c
deleted file mode 100644
index 02ea34bf6..000000000
--- a/mdk-stage1/ppp/pppd/plugins/minconn.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * minconn.c - pppd plugin to implement a `minconnect' option.
- *
- * Copyright 1999 Paul Mackerras.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms. The name of the author
- * may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#include <stddef.h>
-#include <time.h>
-#include "pppd.h"
-
-char pppd_version[] = VERSION;
-
-static int minconnect = 0;
-
-static option_t my_options[] = {
- { "minconnect", o_int, &minconnect,
- "Set minimum connect time before idle timeout applies" },
- { NULL }
-};
-
-static int my_get_idle(struct ppp_idle *idle)
-{
- time_t t;
-
- if (idle == NULL)
- return minconnect? minconnect: idle_time_limit;
- t = idle->xmit_idle;
- if (idle->recv_idle < t)
- t = idle->recv_idle;
- return idle_time_limit - t;
-}
-
-void plugin_init(void)
-{
- info("plugin_init");
- add_options(my_options);
- idle_time_hook = my_get_idle;
-}