Fix host selection in NM auth-dialog
authorDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 31 Aug 2010 23:19:23 +0000 (00:19 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 31 Aug 2010 23:19:23 +0000 (00:19 +0100)
It wasn't actually clearing vpninfo->peer_addr, so we were always just
reconnecting to the first host, even when the user changed the selection.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
nm-auth-dialog.c

index a1ca194..dd696de 100644 (file)
@@ -1175,6 +1175,8 @@ static void connect_host(auth_ui_data *ui_data)
        /* reset ssl context.
         * TODO: this is probably not the way to go... */
        if (ui_data->vpninfo->https_ssl) {
+               free(ui_data->vpninfo->peer_addr);
+               ui_data->vpninfo->peer_addr = NULL;
                openconnect_close_https(ui_data->vpninfo);
        }
        if (ui_data->vpninfo->https_ctx) {