[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31233 - branches/kwallet/subversion/libsvn_subr

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Fri, 16 May 2008 19:50:35 +0200

2008-05-16 Philip Martin <philip_at_codematters.co.uk>:
> arfrever_at_tigris.org writes:
>
>> Author: arfrever
>> Date: Fri May 16 10:09:13 2008
>> New Revision: 31233
>>
>> Log:
>> On the 'kwallet' branch:
>>
>> * subversion/libsvn_subr/cmdline.c
>> (get_auth_simple_provider): Fix doc string and properly handle errors.
>>
>> Found by: danielsh
>>
>> Modified:
>> branches/kwallet/subversion/libsvn_subr/cmdline.c
>>
>> Modified: branches/kwallet/subversion/libsvn_subr/cmdline.c
>> URL: http://svn.collab.net/viewvc/svn/branches/kwallet/subversion/libsvn_subr/cmdline.c?pathrev=31233&r1=31232&r2=31233
>> ==============================================================================
>> --- branches/kwallet/subversion/libsvn_subr/cmdline.c Fri May 16 09:44:59 2008 (r31232)
>> +++ branches/kwallet/subversion/libsvn_subr/cmdline.c Fri May 16 10:09:13 2008 (r31233)
>> @@ -354,7 +354,7 @@ svn_cmdline_handle_exit_error(svn_error_
>> return EXIT_FAILURE;
>> }
>>
>> -/* Return dynamically loaded authentication simple provider. */
>> +/* Dynamically load authentication simple provider. */
>> static svn_boolean_t
>> get_auth_simple_provider(svn_auth_provider_object_t **provider,
>> const char *provider_name,
>> @@ -372,7 +372,7 @@ get_auth_simple_provider(svn_auth_provid
>> funcname = apr_psprintf(pool,
>> "svn_auth_get_%s_simple_provider",
>> provider_name);
>> - svn_dso_load(&dso, libname);
>> + svn_error_clear(svn_dso_load(&dso, libname));
>> if (dso)
>> {
>> if (! apr_dso_sym(&provider_symbol, dso, funcname))
>
> If svn_dso_load returns an error you cannot assume dso has a value you
> can check. Further, simply ignoring all errors makes it hard for
> users to debug problems with dynamic loading.

/**
 * Attempt to load @a libname, returning it in @a dso.
 *
 * If @a libname cannot be loaded set @a dso to NULL and return
 * @c SVN_NO_ERROR.
 *
 * @note Due to pool lifetime issues DSOs are all loaded into a global
 * pool, so you must be certain that there is a bounded number of
 * them that will ever be loaded by the system, otherwise you will
 * leak memory.
 *
 * @since New in 1.4.0.
 */
svn_error_t *svn_dso_load(apr_dso_handle_t **dso, const char *libname);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-16 19:50:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.