[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: syntax of ldap_modify_s
- To: openldap-software@openldap.org
- Subject: Re: syntax of ldap_modify_s
- From: Eli Bach <ebach2@gmail.com>
- Date: Mon, 27 Apr 2009 14:59:38 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:subject :mime-version:date:references:x-mailer; bh=QhbUrETe6R5QnBfsUjz38c4wYTyB/V5tU9pMgoN/w9Y=; b=Xz9mrOFH15dyV5133xw5t0g6why2k/4nrK+Yz57gRyXy6ysQDPtCLPnmPsNpO63gJF 0Sv14RMUH24CdR/H/xNIWAXBbMWo3/FaqeirMu9Ksq7hmvrAyjp3CD5kDSx0na5McR/Z 4IhLLvCL+ifFgO63faeuIhC4YOUPUbra/vZ/k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:subject:mime-version:date:references :x-mailer; b=BGmwojMUM6TG6KW0ROKZYuJhCtLv5ACyvNnyUob5QhnrGvvf/bm2DtHxo+aQ7/RC9/ QM4/IFvmUUlbtfnEp1O6l6otWrVwVIxSO5mwiZrbiOEvPtosTwwXZ5M1j6by+OB4mEpl gwLLjHN6xaWRhu2/V9W0OFQHigcALg+NeOi40=
- In-reply-to: <7d2b0e910904260531o2d30d43bxa728e608f919a67a@mail.gmail.com>
- References: <7d2b0e910904260531o2d30d43bxa728e608f919a67a@mail.gmail.com>
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.