summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/ippool.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-01-19 21:01:21 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-01-19 21:03:52 +0400
commitb02e7ad2059416b2d8b1b4e6e8c12132ed4a6cc3 (patch)
tree2cddaf7019f1adff3e94fa58f23bb37262f4d731 /accel-pppd/extra/ippool.c
parent2ee198430cfc5c6cbf99b5110ebd212d64f22ef0 (diff)
downloadaccel-ppp-b02e7ad2059416b2d8b1b4e6e8c12132ed4a6cc3.tar.gz
accel-ppp-b02e7ad2059416b2d8b1b4e6e8c12132ed4a6cc3.zip
ippool: add support for old style pool name declaration
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd/extra/ippool.c')
-rw-r--r--accel-pppd/extra/ippool.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index 2790183d..825b8f37 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -487,6 +487,18 @@ static void parse_options(const char *opt, char **pool_name, char **allocator)
memcpy(*allocator, ptr1 + 10, len);
(*allocator)[len] = 0;
}
+
+ if (!*pool_name) {
+ ptr1 = strchr(opt, ',');
+ if (!ptr1)
+ return;
+
+ for (ptr2 = ptr1 + 1; *ptr2 && *ptr2 != '='; ptr2++);
+ if (*ptr2 == '=')
+ return;
+
+ *pool_name = _strdup(ptr1 + 1);
+ }
}
static void ippool_init1(void)