summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorFrançois Revel <mmu_man@netsurf-browser.org>2010-01-02 02:24:45 +0000
committerFrançois Revel <mmu_man@netsurf-browser.org>2010-01-02 02:24:45 +0000
commit33034bf6f332a2ee58c75cca1464c496b4e0cab2 (patch)
treeed2a6cb884974bd28d28b277c0acc40726bc7df0 /beos
parentba2396e554aa4e156c6574b74e2cc39ec811205c (diff)
downloadnetsurf-33034bf6f332a2ee58c75cca1464c496b4e0cab2.tar.gz
netsurf-33034bf6f332a2ee58c75cca1464c496b4e0cab2.tar.bz2
Handle new parameter to fetch_send_callback().
svn path=/trunk/netsurf/; revision=9774
Diffstat (limited to 'beos')
-rw-r--r--beos/beos_fetch_rsrc.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/beos/beos_fetch_rsrc.cpp b/beos/beos_fetch_rsrc.cpp
index c595f51cf..89916cb08 100644
--- a/beos/beos_fetch_rsrc.cpp
+++ b/beos/beos_fetch_rsrc.cpp
@@ -135,10 +135,10 @@ static void fetch_rsrc_abort(void *ctx)
static void fetch_rsrc_send_callback(fetch_msg msg,
struct fetch_rsrc_context *c, const void *data,
- unsigned long size)
+ unsigned long size, fetch_error_code errorcode)
{
c->locked = true;
- fetch_send_callback(msg, c->parent_fetch, data, size);
+ fetch_send_callback(msg, c->parent_fetch, data, size, errorcode);
c->locked = false;
}
@@ -161,7 +161,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
if (strlen(c->url) < 6) {
/* 6 is the minimum possible length (rsrc:/) */
fetch_rsrc_send_callback(FETCH_ERROR, c,
- "Malformed rsrc: URL", 0);
+ "Malformed rsrc: URL", 0, FETCH_ERROR_URL);
return false;
}
@@ -171,7 +171,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
/* find the slash */
if ( (slash = strchr(params, '/')) == NULL) {
fetch_rsrc_send_callback(FETCH_ERROR, c,
- "Malformed rsrc: URL", 0);
+ "Malformed rsrc: URL", 0, FETCH_ERROR_URL);
return false;
}
comma = strchr(slash, ',');
@@ -189,7 +189,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
if (c->mimetype == NULL) {
fetch_rsrc_send_callback(FETCH_ERROR, c,
"Unable to allocate memory for mimetype in rsrc: URL",
- 0);
+ 0, FETCH_ERROR_MEMORY);
return false;
}
@@ -211,7 +211,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
if (!found) {
fetch_rsrc_send_callback(FETCH_ERROR, c,
"Cannot locate rsrc: URL",
- 0);
+ 0, FETCH_ERROR_MISC);
return false;
}
@@ -225,7 +225,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
if (!data) {
fetch_rsrc_send_callback(FETCH_ERROR, c,
"Cannot load rsrc: URL",
- 0);
+ 0, FETCH_ERROR_MISC);
return false;
}
@@ -233,7 +233,7 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
c->data = (char *)malloc(c->datalen);
if (c->data == NULL) {
fetch_rsrc_send_callback(FETCH_ERROR, c,
- "Unable to allocate memory for rsrc: URL", 0);
+ "Unable to allocate memory for rsrc: URL", 0, FETCH_ERROR_MEMORY);
return false;
}
memcpy(c->data, data, c->datalen);
@@ -245,7 +245,7 @@ static void fetch_rsrc_poll(const char *scheme)
{
struct fetch_rsrc_context *c, *next;
struct cache_data cachedata;
-
+
if (ring == NULL) return;
cachedata.req_time = time(NULL);
@@ -285,14 +285,14 @@ static void fetch_rsrc_poll(const char *scheme)
* call to fetch_rsrc_send_callback().
*/
fetch_rsrc_send_callback(FETCH_TYPE,
- c, c->mimetype, c->datalen);
+ c, c->mimetype, c->datalen, FETCH_ERROR_NO_ERROR);
if (!c->aborted) {
fetch_rsrc_send_callback(FETCH_DATA,
- c, c->data, c->datalen);
+ c, c->data, c->datalen, FETCH_ERROR_NO_ERROR);
}
if (!c->aborted) {
fetch_rsrc_send_callback(FETCH_FINISHED,
- c, &cachedata, 0);
+ c, &cachedata, 0, FETCH_ERROR_NO_ERROR);
}
} else {
LOG(("Processing of %s failed!", c->url));