From e3d0ac6266a0c92cd785cf57d9068d19edeb7006 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Wed, 10 Jul 2013 16:43:29 -0500 Subject: Add an extra call to fix windows hooking. This is required to have persistent cookies on windows. Thanks wenzo for writing the extremely magical magic fairydust code. --- cookie.c | 5 +++++ xombrero.h | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cookie.c b/cookie.c index 8de0fbc..564f919 100644 --- a/cookie.c +++ b/cookie.c @@ -210,6 +210,11 @@ setup_cookies(void) set_hook((void *)&_soup_cookie_jar_delete_cookie, "soup_cookie_jar_delete_cookie"); +#if defined __MINGW32__ + /* windows hooking is a horror show, nothing to see here move along */ + fixup_windows_hooks(); +#endif + if (cookies_enabled == 0) return; diff --git a/xombrero.h b/xombrero.h index a94d67d..9179412 100644 --- a/xombrero.h +++ b/xombrero.h @@ -416,11 +416,13 @@ void button_set_file(GtkWidget *, char *); void webview_progress_changed_cb(WebKitWebView *, GParamSpec *, struct tab *); /* cookies */ -int remove_cookie(int); -int remove_cookie_domain(int); -int remove_cookie_all(void); -void print_cookie(char *msg, SoupCookie *); -void setup_cookies(void); +int remove_cookie(int); +int remove_cookie_domain(int); +int remove_cookie_all(void); +void print_cookie(char *msg, SoupCookie *); +void setup_cookies(void); +void soup_cookie_jar_add_cookie(SoupCookieJar *, SoupCookie *); +void soup_cookie_jar_delete_cookie(SoupCookieJar *, SoupCookie *); /* history */ int insert_history_item(const gchar *uri, const gchar *title, time_t time); @@ -983,6 +985,8 @@ extern uint64_t blocked_cookies; extern SoupSession *session; extern void (*_soup_cookie_jar_add_cookie)(SoupCookieJar *, SoupCookie *); +extern void (*_soup_cookie_jar_delete_cookie)(SoupCookieJar *, + SoupCookie *); extern struct history_list hl; extern int hl_purge_count; -- cgit 1.4.1-2-gfad0