diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 11:20:02 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 11:20:02 +0100 |
commit | d9e7d5810678c1470808c3de63f7bde412b3d17b (patch) | |
tree | 68d47410cb177d0125127ac186c2a05127b82097 /atari/login.c | |
parent | 5a5eab9a1ea7bf6dd79420668c2c0df1a3ea88f5 (diff) | |
download | netsurf-d9e7d5810678c1470808c3de63f7bde412b3d17b.tar.gz netsurf-d9e7d5810678c1470808c3de63f7bde412b3d17b.tar.bz2 |
Fix up ripples from urldb change.
Diffstat (limited to 'atari/login.c')
-rwxr-xr-x | atari/login.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/atari/login.c b/atari/login.c index 2dc766f56..ddcfeba43 100755 --- a/atari/login.c +++ b/atari/login.c @@ -42,7 +42,7 @@ extern void * h_gem_rsrc; -bool login_form_do( char * url, char * realm, char ** out ) +bool login_form_do( nsurl * url, char * realm, char ** out ) { OBJECT *tree, *newtree; WINDOW * form; @@ -51,19 +51,21 @@ bool login_form_do( char * url, char * realm, char ** out ) bool bres = false; int res = 0; const char * auth; - char * host; - assert( url_host( url, &host) == URL_FUNC_OK ); + lwc_string * host = nsurl_get_component(url, NSURL_HOST); + assert(host != NULL); if( realm == NULL ){ realm = (char*)"Secure Area"; } - int len = strlen(realm) + strlen(host) + 4; + int len = strlen(realm) + lwc_string_length(host) + 4; char * title = malloc( len ); strncpy(title, realm, len ); strncpy(title, ": ", len-strlen(realm) ); - strncat(title, host, len-strlen(realm)+2 ); - + strncat(title, lwc_string_data(host), len-strlen(realm)+2 ); + + lwc_string_unref(host); + auth = urldb_get_auth_details(url, realm); user[0] = 0; pass[0] = 0; |