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

Re: syntax of ldap_modify_s

On Apr 26, 2009, at 5:31 AM, Adrian St. John-Bee wrote:

char** vals0;
vals0[0] = "eric@ntu.ac.uk";

It looks like these two lines are your problem.

You are just defining vals0 as a pointer to a pointer, and then referencing it as an array of pointers.

However, you don't allocate any memory to actually store any data into.

If you switched you're code to something like:

char* vals0[2];
vals0[0] = "eric@ntu.ac.uk";
vals0[1] = NULL;

I have no comment on whether you are using the ldap api's correctly or not.