Re: [PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

2018-04-12 Thread Daniel Lenski
On Wed, Mar 7, 2018 at 11:34 AM, David Woodhouse wrote: > > > On Wed, 2018-03-07 at 10:01 +0200, Daniel Lenski wrote: >> What do you prefer? Refactoring the two versions of xmlnode_get_text() >> down to a single function, renaming the gpst.c version, something >> else…? > >

Re: [PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

2018-03-07 Thread David Woodhouse
On Wed, 2018-03-07 at 09:34 +, David Woodhouse wrote: > > Maybe we should pass the xmlNode into add_option() not a string? Then > it's nice and simple. And more xmlnode_get_text() invocations can turn > into simple xmlnode_is_named()? The above code becomes > > for (xml_node =

Re: [PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

2018-03-07 Thread David Woodhouse
On Wed, 2018-03-07 at 10:01 +0200, Daniel Lenski wrote: > What do you prefer? Refactoring the two versions of xmlnode_get_text() > down to a single function, renaming the gpst.c version, something > else…? Don't know... one option is to ditch it entirely. Some of those cases where you're just

Re: [PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

2018-03-07 Thread Daniel Lenski
On Tue, Mar 6, 2018 at 11:40 AM, David Woodhouse wrote: > Thanks for tidying this up. Pushed to my gpst branch with one fixup so > far, still reading through... > > On Sun, 2018-03-04 at 11:31 +0200, Daniel Lenski wrote: >> >> +/* similar to auth.c's xmlnode_get_text,

Re: [PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

2018-03-07 Thread Daniel Lenski
Here is a small patch to fix the comment on add_option… diff --git a/gpst.c b/gpst.c index 85987b2..1d5c748 100644 --- a/gpst.c +++ b/gpst.c @@ -84,11 +84,10 @@ static int xmlnode_get_text(xmlNode *xml_node, const char *name, char **var) return 0; } -/* We behave like CSTP — create a

Re: [PATCH 2/5] add PAN GlobalProtect protocol support (HTTPS tunnel only)

2018-03-06 Thread David Woodhouse
Thanks for tidying this up. Pushed to my gpst branch with one fixup so far, still reading through... On Sun, 2018-03-04 at 11:31 +0200, Daniel Lenski wrote: > > +/* similar to auth.c's xmlnode_get_text, including that *var should be freed > by the caller, > +   but without the hackish param /