[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/clients/tools common.c common.h

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?  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


Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it