Patch against xml.c -- grab some more fields from the xml config file

Jonas Kölker jonaskoelker at gnu.org
Thu Feb 18 18:02:21 EST 2010


Hello, everybody.

I've been monkeying a bit with xml.c, such that I can use openconnect
non-interactively, i.e. such that it reads all the input I'd otherwise have to
type in manually from the xml config file.

In the process, I redecorated a few loops: "if(x) { ... }" became "if (!x)
continue; ...", such that the indentation doesn't as deep---IMO, it makes the
code easier to read.

I also added a helper function which grabs the content out of a named element,
abstracting away some rather equal if-branches; I added calls to that for the
newly-to-be-looked-at elements.

I've attached a patch containing those changes.  I hope y'all like them and
will merge them into the main tree, or implement an equivalent functionality.
Or if I can already use openconnect non-interactively, point out to me how :)

Kind regards, Jonas

-- 
Jonas Kölker <jonaskoelker at gnu.org> <URL:http://jonaskoelker.ignorelist.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlconfig.patch
Type: text/x-diff
Size: 3742 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20100219/b4b41201/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20100219/b4b41201/attachment.sig>


More information about the openconnect-devel mailing list