options: fix option check for "plugin"

The "plugin" option has one required argument, and an optional one.

This fixes a regression in 3d6a4cd
(https://community.openvpn.net/openvpn/ticket/557).

Signed-off-by: Daniel Hahler <git@thequod.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20150721100836.GV382@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9932
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
Daniel Hahler 2015-07-19 21:55:22 +02:00 committed by Gert Doering
parent d4fbe287fc
commit 82acf21634

View file

@ -4325,7 +4325,7 @@ add_option (struct options *options,
}
#endif
#ifdef ENABLE_PLUGIN
else if (streq (p[0], "plugin") && p[1] && !p[2])
else if (streq (p[0], "plugin") && p[1] && !p[3])
{
VERIFY_PERMISSION (OPT_P_PLUGIN);
if (!options->plugin_list)