diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-05 18:44:14 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-05 18:44:14 -0400 |
commit | a096c90f4a10c92ba55d8f34ad01266d05e47196 (patch) | |
tree | 9649bdb0b385ebe289bcc77187717441c96c7432 /src/bw.c | |
parent | 9eff7b30b70ee13501dba6e6061cd312b3a7186e (diff) |
Added an API to access the expected URL resource
This fixes a segfault bug introduced by changeset 350af350b840.
By mistake the expected URL got inside the parallel handling of CCC,
into a race condition with a segfault path.
Diffstat (limited to 'src/bw.c')
-rw-r--r-- | src/bw.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -55,7 +55,6 @@ BrowserWindow *a_Bw_new() bw->nav_stack_ptr = -1; /* Init expect */ - bw->nav_expecting = FALSE; bw->nav_expect_url = NULL; bw->redirect_level = 0; @@ -313,3 +312,27 @@ BrowserWindow *a_Bw_get(int i) return NULL; } +/* expect API ------------------------------------------------------------- */ + +void a_Bw_expect(BrowserWindow *bw, const DilloUrl *url) +{ + a_Url_free(bw->nav_expect_url); + bw->nav_expect_url = a_Url_dup(url); +} + +void a_Bw_cancel_expect(BrowserWindow *bw) +{ + a_Url_free(bw->nav_expect_url); + bw->nav_expect_url = NULL; +} + +bool_t a_Bw_expecting(BrowserWindow *bw) +{ + return (bw->nav_expect_url != NULL); +} + +const DilloUrl *a_Bw_expected_url(BrowserWindow *bw) +{ + return bw->nav_expect_url; +} + |