- add more error handling and free/unref data.
- split code in 3 functions: vpn_connection_import(),
connection_add() and main(). These steps are mostly
independent, and having them in separate functions
makes their separation clearer.
- handle error from nm_client_add_connection_async() to
exit program with non zero exit code.
../examples/C/glib/vpn-import-libnm.c: In function main:
../examples/C/glib/vpn-import-libnm.c:72:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
Fixes: 905f9975d2 ('example: importing vpn with libnm')