[Date Prev][Date Next]
Re: commit: ldap/clients/tools common.c common.h
At 03:23 AM 11/5/2005, Pierangelo Masarati wrote:
>On Fri, 2005-11-04 at 23:53 +0000, kurt@OpenLDAP.org wrote:
>> Update of /repo/OpenLDAP/pkg/ldap/clients/tools
>> Modified Files:
>> common.c 1.51 -> 1.52
>> common.h 1.16 -> 1.17
>> Log Message:
>> ITS#4147 fix
>> Should replace all ldap_perror calls with tool_perror calls to
>> avoid use of deprecated function.
>there is some (erroneous?) behavior since tool_error() is called also
>with LDAP_SUCCESS when matched == "" or info == "" (I'm fixing it); but
>this likely always happens, because the client library is always
>mallocing a number of "" when parsing results. Wouldn't it be better to
>leave the pointers NULL when there's nothing to return?
Yes. Given that matched and DN come from non-optional
protocol fields where empty indicates no value (ugh),
we should return NULL instead of ->"".
>I know it's
>going to be a significant API change, but it's going to save a lot of
>mallocs and of memory fragmentation, since successful results are most