Olivier Beytrison wrote:
Initial commit in my fork is visible here : https://github.com/olivierbeytrison/freeradius-server/commits/rlm_ldap_add_e...
Btw, it has been some years since the last time I wrote C. Be gentle and advise, I'll try to make it as clean as possible. Any advice are welcome !
I've cleaned up the code && pushed it back to the main repository. some comments: - formatting is good. By good, I mean "Alan is almost fanatical about formatting". - similar with variable names, etc. CamelCase is annoying. Hungarian notation with type-names is annoying. - "goto cleanup" is OK, but it should be done early, rather than checking for errors: if (!err...) That's BAD. Just do "if (err) goto cleanup" - simplicity is to be desired. - functions are "static" where possible - parameters are "char *str, size_t size", not the other way around. - I squashed all of the changes into one commit, and added the "configure" changes, too. - I didn't make any changes to the main rlm_ldap.c file. I'm not sure I'm happy with that code. There may be simpler ways to do it. - malloc can be avoided for small buffers. (and should be avoided) Please grab a fresh copy, and see how it works for you. Alan DeKok.