removed set/getenv functions

This commit is contained in:
Sylvain Rochet 2012-06-02 02:23:56 +02:00
parent 6c908ac727
commit 668d5d9d92
3 changed files with 14 additions and 2 deletions

View File

@ -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;

View File

@ -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 */

View File

@ -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 */