diff options
author | Dave Beckett <dave@dajobe.org> | 2008-02-25 07:24:07 +0000 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2008-02-25 07:24:07 +0000 |
commit | 7ed3e460e7c579197df6476f7b5769d603f58961 (patch) | |
tree | 8e06ea2e5f72e5cf532f0fe49f36453d5f752ecd /src/raptor_www.c | |
parent | 76851f53627d9d5ddfef4ee9d235c5eea436d338 (diff) | |
download | raptor-7ed3e460e7c579197df6476f7b5769d603f58961.tar.gz |
Added struct raptor_message_handler_closure for user data plus an
error handler.
(raptor_log_error_simple): Removed, only used in raptor_sax2.c
(raptor_log_error_to_handlers): Added to log to an
raptor_error_handlers object.
(raptor_sax2_simple_error): Tidy erorr calling to use closure
pointer.
(raptor_sax2_parse_chunk, raptor_log_error_to_handlers): Use
raptor_log_error_to_handlers
(raptor_www_set_error_handler, raptor_www_error): Update for closure
struct.
(raptor_grddl_fetch_uri, raptor_grddl_parse_chunk): Update for
closure struct. Tidy saving and restoring error handlers
(raptor_new_parser): Init last_log_level for error handlers.
(raptor_parse_uri_with_connection, raptor_parser_simple_error,
raptor_parser_error_varargs, raptor_parser_error_message_handler,
raptor_parser_warning, raptor_parser_warning_message_handler,
raptor_set_fatal_error_handler, raptor_set_error_handler,
raptor_set_warning_handler): Update for closure struct.
(raptor_libxml_warning, raptor_libxml_error_common,
raptor_libxml_generic_error, raptor_libxml_xmlStructuredErrorFunc):
Update for closure struct.
(raptor_www_libxml_init): Update for closure struct.
Diffstat (limited to 'src/raptor_www.c')
-rw-r--r-- | src/raptor_www.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/raptor_www.c b/src/raptor_www.c index 7ad86b44..ab5494d9 100644 --- a/src/raptor_www.c +++ b/src/raptor_www.c @@ -256,11 +256,11 @@ raptor_www_free(raptor_www* www) **/ void raptor_www_set_error_handler(raptor_www* www, - raptor_message_handler error_handler, + raptor_message_handler error_handler, void *error_data) { - www->error_handlers.user_data[RAPTOR_LOG_LEVEL_ERROR]=error_data; - www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR]=error_handler; + www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data=error_data; + www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler=error_handler; } @@ -538,8 +538,8 @@ raptor_www_error(raptor_www* www, const char *message, ...) va_start(arguments, message); raptor_log_error_varargs(RAPTOR_LOG_LEVEL_ERROR, - www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR], - www->error_handlers.user_data[RAPTOR_LOG_LEVEL_ERROR], + www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].handler, + www->error_handlers.handlers[RAPTOR_LOG_LEVEL_ERROR].user_data, &www->locator, message, arguments); |