From 668d5d9d9282e1871fa7523b89a22f8715b6bc3d Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 2 Jun 2012 02:23:56 +0200 Subject: [PATCH] removed set/getenv functions --- src/netif/ppp/auth.c | 3 ++- src/netif/ppp/ipcp.c | 4 ++++ src/netif/ppp/ppp.c | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/netif/ppp/auth.c b/src/netif/ppp/auth.c index c067545a..45989347 100644 --- a/src/netif/ppp/auth.c +++ b/src/netif/ppp/auth.c @@ -1056,11 +1056,12 @@ auth_peer_success(unit, protocol, prot_flavor, name, namelen) /* * Save the authenticated name of the peer for later. */ + /* FIXME: do we need that ? */ if (namelen > sizeof(peer_authname) - 1) namelen = sizeof(peer_authname) - 1; MEMCPY(peer_authname, name, namelen); peer_authname[namelen] = 0; - script_setenv("PEERNAME", peer_authname, 0); + //script_setenv("PEERNAME", peer_authname, 0); /* Save the authentication method for later. */ auth_done[unit] |= bit; diff --git a/src/netif/ppp/ipcp.c b/src/netif/ppp/ipcp.c index 1fb9652b..89ec6c4a 100644 --- a/src/netif/ppp/ipcp.c +++ b/src/netif/ppp/ipcp.c @@ -1816,14 +1816,17 @@ ipcp_up(f) warn("Could not determine remote IP address: defaulting to %I", ho->hisaddr); } +#if 0 /* UNUSED */ script_setenv("IPLOCAL", ip_ntoa(go->ouraddr), 0); if (ho->hisaddr != 0) script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr), 1); +#endif /* UNUSED */ if (!go->req_dns1) go->dnsaddr[0] = 0; if (!go->req_dns2) go->dnsaddr[1] = 0; +#if 0 /* UNUSED */ if (go->dnsaddr[0]) script_setenv("DNS1", ip_ntoa(go->dnsaddr[0]), 0); if (go->dnsaddr[1]) @@ -1832,6 +1835,7 @@ ipcp_up(f) script_setenv("USEPEERDNS", "1", 0); create_resolv(go->dnsaddr[0], go->dnsaddr[1]); } +#endif /* UNUSED */ /* FIXME: check why it fails, just to know */ #if 0 /* Unused */ diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index c33922da..e94172f3 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -726,6 +726,7 @@ setup_signals() } #endif +#if 0 /* * set_ifunit - do things we need to do once we know which ppp * unit we are using. @@ -742,6 +743,7 @@ set_ifunit(iskey) // create_linkpidfile(getpid()); } } +#endif #if 0 /* @@ -1256,12 +1258,14 @@ update_link_stats(u) link_stats.pkts_in -= old_link_stats.pkts_in; link_stats.pkts_out -= old_link_stats.pkts_out; +#if 0 slprintf(numbuf, sizeof(numbuf), "%u", link_connect_time); script_setenv("CONNECT_TIME", numbuf, 0); slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_out); script_setenv("BYTES_SENT", numbuf, 0); slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_in); script_setenv("BYTES_RCVD", numbuf, 0); +#endif } @@ -1804,7 +1808,8 @@ add_notifier(notif, func, arg) np = malloc(sizeof(struct notifier)); if (np == 0) - novm("notifier struct"); + return; + //novm("notifier struct"); np->next = *notif; np->func = func; np->arg = arg; @@ -1848,6 +1853,7 @@ notify(notif, val) } } +#if 0 /* UNUSED */ /* * novm - log an error message saying we ran out of memory, and die. */ @@ -1934,3 +1940,4 @@ script_unsetenv(var) } } } +#endif /* UNUSED */