diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-08-14 11:34:30 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2018-08-15 07:29:58 +0100 |
commit | 66a97b863ce450bb0932ea4813b81c9b62d84b83 (patch) | |
tree | e105c2dd0cc633053e8f66af91bf7c8537a0c557 /frontends/atari/gui.c | |
parent | c55a31aa110cd5f469a7758f63c0f0dbb26da2c9 (diff) | |
download | netsurf-66a97b863ce450bb0932ea4813b81c9b62d84b83.tar.gz netsurf-66a97b863ce450bb0932ea4813b81c9b62d84b83.tar.bz2 |
Atari: Move to new HTTP auth API.
Diffstat (limited to 'frontends/atari/gui.c')
-rw-r--r-- | frontends/atari/gui.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c index 6ee63b301..14e02e5f8 100644 --- a/frontends/atari/gui.c +++ b/frontends/atari/gui.c @@ -767,23 +767,30 @@ static void gui_set_clipboard(const char *buffer, size_t length, } static void gui_401login_open(nsurl *url, const char *realm, - nserror (*cb)(bool proceed, void *pw), void *cbpw) + const char *username, const char *password, + nserror (*cb)(const char *username, + const char *password, + void *pw), + void *cbpw) { - bool bres; - char * out = NULL; - bres = login_form_do( url, (char*)realm, &out); - if (bres) { - NSLOG(netsurf, INFO, "url: %s, realm: %s, auth: %s\n", - nsurl_access(url), realm, out); - urldb_set_auth_details(url, realm, out); - } - if (out != NULL) { - free( out ); - } - if (cb != NULL) { - cb(bres, cbpw); - } - + bool bres; + char * u_out = NULL; + char * p_out = NULL; + + bres = login_form_do(url, (char*)realm, &u_out, &p_out); + if (bres) { + NSLOG(netsurf, INFO, "url: %s, realm: %s, auth: %s\n", + nsurl_access(url), realm, out); + } + if (cb != NULL) { + cb(u_out, p_out, cbpw); + } + if (u_out != NULL) { + free(u_out); + } + if (p_out != NULL) { + free(p_out); + } } static nserror |