Skip to content

Commit

Permalink
Add an extra call to fix windows hooking.
Browse files Browse the repository at this point in the history
This is required to have persistent cookies on windows.
Thanks wenzo for writing the extremely magical magic fairydust code.
  • Loading branch information
Marco Peereboom committed Jul 10, 2013
1 parent dfa491f commit e3d0ac6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions cookie.c
Expand Up @@ -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;

Expand Down
14 changes: 9 additions & 5 deletions xombrero.h
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e3d0ac6

Please sign in to comment.