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

Re: changes to distributed collect.c overlay



Brett @Google wrote:
In the event somebody may find this useful, attached is a patch to
HEAD to allow a simple form of attribute inheritance.

It has also been contributed as ITS#5659.. (the patch in ftp /incoming
is newer than the one in the tarball)

If anyone wants to try it out, please do and let me know if there are
any issues..

(this is a simple change to a demo overlay Howard Chu did some time
ago, which is not built by default)

Pretty good. Just a couple points - it's not necessary to strdup c->argv[] before processing it. Since this overlay is the final consumer of the argv, there's no reason to preserve it. Trash it at will. strtok should probably be used instead of strtok_r in your config code since strtok_r is not universal and the code is single-threaded already.


Also, strcat/strncat are never to be used, use lutil_strcopy/strncopy instead.

ci_ad_len should probably be ci_ad_num; "_len" is always used for the length of strings, "_num" to count anything else.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/