diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-08-05 14:29:53 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-08-05 14:30:30 +0100 |
commit | 6ba199c7d7bee1909107ee0b8cbaf749c575b310 (patch) | |
tree | 9932d32f3fd90c341022257d6c22061fe990725c /content/content.c | |
parent | 2171f13ab334716250ca2bc53946806f7a88c8a3 (diff) | |
download | netsurf-6ba199c7d7bee1909107ee0b8cbaf749c575b310.tar.gz netsurf-6ba199c7d7bee1909107ee0b8cbaf749c575b310.tar.bz2 |
Content messages: Remove ERRORCODE, rework ERROR
This reworks CONTENT_MSG_ERROR to be structured data and
removes the CONTENT_MSG_ERRORCODE message kind.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/content.c')
-rw-r--r-- | content/content.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/content/content.c b/content/content.c index af4cdaac3..367a0e5d1 100644 --- a/content/content.c +++ b/content/content.c @@ -173,7 +173,8 @@ nserror content_llcache_callback(llcache_handle *llcache, case LLCACHE_EVENT_ERROR: /** \todo Error page? */ c->status = CONTENT_STATUS_ERROR; - msg_data.error = event->data.msg; + msg_data.errordata.errorcode = NSERROR_UNKNOWN; + msg_data.errordata.errormsg = event->data.msg; content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); break; case LLCACHE_EVENT_PROGRESS: @@ -816,12 +817,13 @@ void content_broadcast_errorcode(struct content *c, nserror errorcode) assert(c); - data.errorcode = errorcode; + data.errordata.errorcode = errorcode; + data.errordata.errormsg = NULL; for (user = c->user_list->next; user != 0; user = next) { next = user->next; /* user may be destroyed during callback */ if (user->callback != 0) { - user->callback(c, CONTENT_MSG_ERRORCODE, + user->callback(c, CONTENT_MSG_ERROR, &data, user->pw); } } |