[redland-dev] Patch: Log handler uses wrong user_data

René Puls kianga at gmail.com
Thu Jul 8 21:20:31 BST 2004


Attached is another mini-patch that makes the librdf_log_simple()
function use the correct user_data for the user-installed log handler.
(It used error_user_data instead of log_user_data.)

I also have a question regarding this log handler... If I'm using
Redland from a language like Objective-C, is it safe to throw an
exception inside the handler? This would interrupt normal execution,
so any Redland-internal code that follows the librdf_log_simple() call
would never be reached.

The log handler in Python also seems to throw exceptions, although I'm
not sure if that has the same radical effects as in Obj-C. :-)

René
-------------- next part --------------
--- redland-0.9.17/librdf/rdf_log.c	Wed Jun 30 15:50:28 2004
+++ redland-0.9.17/librdf/rdf_log.c.new	Thu Jul  8 21:50:57 2004
@@ -89,7 +89,7 @@
       world->log.message=message;
       world->log.locator=locator;
 
-      if(world->log_handler(world->error_user_data, &world->log))
+      if(world->log_handler(world->log_user_data, &world->log))
         return;
 
     } else {


More information about the redland-dev mailing list