aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-28 21:33:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-28 21:33:49 +0000
commit9304cfd07cfd78cf84d1a75b064dc0c5785e5e9a (patch)
treed5f1bc0e430f4460a690cf26074024d66aa93f89
parent3f7acdfe6e033e478b72d591a8920e9a5dd9ce45 (diff)
Notes
-rw-r--r--usr.sbin/ppp/command.c4
-rw-r--r--usr.sbin/ppp/ipcp.c4
-rw-r--r--usr.sbin/ppp/ipv6cp.c4
-rw-r--r--usr.sbin/ppp/radius.c2
-rw-r--r--usr.sbin/ppp/server.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 6bdf0c965cc3..e90d96b22b33 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -2051,7 +2051,7 @@ SetVariable(struct cmdargs const *arg)
res = 1;
} else {
arg->bundle->radius.alive.interval = atoi(argp);
- if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) {
+ if (arg->bundle->radius.alive.interval && !*arg->bundle->radius.cfg.file) {
log_Printf(LogWARN, "rad_alive requires radius to be configured\n");
res = 1;
} else if (arg->bundle->ncp.ipcp.fsm.state == ST_OPENED) {
@@ -2335,7 +2335,7 @@ SetVariable(struct cmdargs const *arg)
res = 1;
}
- if (arg->bundle->radius.port_id_type && !arg->bundle->radius.cfg.file) {
+ if (arg->bundle->radius.port_id_type && !*arg->bundle->radius.cfg.file) {
log_Printf(LogWARN, "rad_port_id requires radius to be configured\n");
res = 1;
}
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c
index 80b3a1ba1aff..dbb1e7935cc3 100644
--- a/usr.sbin/ppp/ipcp.c
+++ b/usr.sbin/ppp/ipcp.c
@@ -880,7 +880,7 @@ IpcpLayerDown(struct fsm *fp)
radius_Account(&fp->bundle->radius, &fp->bundle->radacct,
fp->bundle->links, RAD_STOP, &ipcp->throughput);
- if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
+ if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE,
NULL, NULL);
radius_StopTimer(&fp->bundle->radius);
@@ -949,7 +949,7 @@ IpcpLayerUp(struct fsm *fp)
radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
RAD_START, &ipcp->throughput);
- if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
+ if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE,
NULL, NULL);
radius_StartTimer(fp->bundle);
diff --git a/usr.sbin/ppp/ipv6cp.c b/usr.sbin/ppp/ipv6cp.c
index 72c3b9a86a5f..908868036a8d 100644
--- a/usr.sbin/ppp/ipv6cp.c
+++ b/usr.sbin/ppp/ipv6cp.c
@@ -486,7 +486,7 @@ ipv6cp_LayerUp(struct fsm *fp)
* evaluated.
*/
if (!Enabled(fp->bundle, OPT_IPCP)) {
- if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
+ if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE,
NULL, NULL);
}
@@ -539,7 +539,7 @@ ipv6cp_LayerDown(struct fsm *fp)
* evaluated.
*/
if (!Enabled(fp->bundle, OPT_IPCP)) {
- if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
+ if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE,
NULL, NULL);
}
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c
index dc71ab316711..f79814125eef 100644
--- a/usr.sbin/ppp/radius.c
+++ b/usr.sbin/ppp/radius.c
@@ -1345,7 +1345,7 @@ radius_alive(void *v)
void
radius_StartTimer(struct bundle *bundle)
{
- if (bundle->radius.cfg.file && bundle->radius.alive.interval) {
+ if (*bundle->radius.cfg.file && bundle->radius.alive.interval) {
bundle->radius.alive.timer.func = radius_alive;
bundle->radius.alive.timer.name = "radius alive";
bundle->radius.alive.timer.load = bundle->radius.alive.interval * SECTICKS;
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c
index 864c62742aa9..3997eafeb2d0 100644
--- a/usr.sbin/ppp/server.c
+++ b/usr.sbin/ppp/server.c
@@ -248,7 +248,7 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask)
oldmask = (mode_t)-1; /* Silence compiler */
- if (server.cfg.sockname && !strcmp(server.cfg.sockname, name))
+ if (server.cfg.sockname[0] != '\0' && !strcmp(server.cfg.sockname, name))
server_Close(bundle);
memset(&ifsun, '\0', sizeof ifsun);