[Vortex] Patch: Use "const" appropriately in API; add logging mutex

Jens Alfke jens at mooseyard.com
Tue Dec 18 19:00:26 CET 2007

On 18 Dec '07, at 4:54 AM, Francis Brosnan Blazquez wrote:

> 1) __vortex_sasl_auth_data_sanity_check and
> __vortex_sasl_initiator_do_initial_step weren't updated to the const
> char * decl.

Yup, I only looked at functions in the public API (and a few private  
fns called from public APIs that had to be updated as well to avoid  
compiler errors.)

> 2) vortex_connection_set_data_full can't be updated to the const  
> char *
> declaration for the key parameter because the function receives a key
> destroy function.

You're right.

> 3) vortex_frame_get_error_message code parameter was not updated to  
> use
> const char *.

It shouldn't return a const pointer, because the string has to be  
freed by the caller.

> In the same direction, having this activated makes the global context
> execution to behave in a really different way (than executing without
> log) because all threads are synchronized by log calls

That's true, I hadn't considered how that could affect the behavior of  
the program. I agree that turning on the mutex should be optional, then.

Thanks for taking the patch and for your additional work!

One more minor change I'd like to make: Allow the "log level" to be  
configured, so that for example I could reduce the verbosity by  
turning on 'warning' but not 'debug' level logging. It's probably  
best, then, if I check out top-of-tree from SVN and submit a patch  
based on that, to avoid a lot of merging on your end.


More information about the Vortex mailing list