mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-11 13:29:21 +03:00
fetch_can_fetch takes a nsurl now.
svn path=/trunk/netsurf/; revision=12900
This commit is contained in:
parent
e1f7a37f15
commit
58225862c2
13
riscos/uri.c
13
riscos/uri.c
@ -32,6 +32,7 @@
|
||||
#include "riscos/uri.h"
|
||||
#include "riscos/url_protocol.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/nsurl.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
void ro_uri_message_received(wimp_message *msg)
|
||||
@ -40,10 +41,20 @@ void ro_uri_message_received(wimp_message *msg)
|
||||
uri_h uri_handle;
|
||||
char* uri_requested;
|
||||
int uri_length;
|
||||
nsurl *nsurl;
|
||||
|
||||
uri_handle = uri_message->handle;
|
||||
|
||||
if (!fetch_can_fetch(uri_message->uri)) return;
|
||||
if (nsurl_create(uri_message->uri, &nsurl) != NSERROR_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fetch_can_fetch(nsurl)) {
|
||||
nsurl_unref(nsurl);
|
||||
return;
|
||||
}
|
||||
|
||||
nsurl_unref(nsurl);
|
||||
|
||||
uri_message->your_ref = uri_message->my_ref;
|
||||
uri_message->action = message_URI_PROCESS_ACK;
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "riscos/uri.h"
|
||||
#include "riscos/url_protocol.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/nsurl.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
/**
|
||||
@ -52,6 +53,7 @@ void ro_url_message_received(wimp_message *message)
|
||||
inetsuite_message_open_url *url_message =
|
||||
(inetsuite_message_open_url*) &message->data;
|
||||
os_error *error;
|
||||
nsurl *nsurl;
|
||||
|
||||
/* If the url_message->indirect.tag is non-zero,
|
||||
* then the message data is contained within the message block.
|
||||
@ -98,11 +100,19 @@ void ro_url_message_received(wimp_message *message)
|
||||
url[i] = 0;
|
||||
}
|
||||
|
||||
if (!fetch_can_fetch(url)) {
|
||||
if (nsurl_create(url, &nsurl) != NSERROR_OK) {
|
||||
free(url);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fetch_can_fetch(nsurl)) {
|
||||
nsurl_unref(nsurl);
|
||||
free(url);
|
||||
return;
|
||||
}
|
||||
|
||||
nsurl_unref(nsurl);
|
||||
|
||||
/* send ack */
|
||||
message->your_ref = message->my_ref;
|
||||
error = xwimp_send_message(wimp_USER_MESSAGE_ACKNOWLEDGE, message,
|
||||
|
Loading…
Reference in New Issue
Block a user