hi,
int rc = ldap_add_ext_s(ld, [userDN cStringUsingEncoding:NSUTF8StringEncoding], mods, hcdTC_new, NULL );
hcdTransactionId.ldctl_value.bv_val = (hcdTC_new[0])->ldctl_value.bv_val;
hcdTransactionId.ldctl_value.bv_len = (hcdTC_new[0])->ldctl_value.bv_len;
rc = ldap_add_ext_s(ld, [userDN cStringUsingEncoding:NSUTF8StringEncoding], mods, hcdTC_rollback, NULL );;
static LDAPControl hcdTransactionControl_new =
{
"1.3.18.0.2.10.3", /* -- hcdTransactionControl -- */
{ 3, "\x4E\x45\x57\x00" }, /* -- NEW ------------- */
'\0' /* -- critical --------------- */
} ;
static LDAPControl *hcdTC_new[2] = { &hcdTransactionControl_new, NULL };
static LDAPControl hcdTransactionId =
{
"1.3.18.0.2.10.4", /* -- hcdTransactionId ------ */
{ 1, "\x31\x00" }, /* -- TXN Id ---------------- */
'\0' /* -- critical -------------- */
};
static LDAPControl *hcdTC_Id[2] = { &hcdTransactionId, NULL };
static LDAPControl hcdTransactionControl_commit =
{
"1.3.18.0.2.10.3", /* -- hcdTransactionControl -- */
{ 6, "\x43\x4F\x4D\x4D\x49\x54\x00" },/* - COMMIT -- */
'\0' /* -- critical --------------- */
};
static LDAPControl *hcdTC_commit[3] = { &hcdTransactionControl_commit, &hcdTransactionId, NULL };
static LDAPControl hcdTransaction_rollback =
{
"1.3.18.0.2.10.3", /* -- hcdTransactionControl -- */
{ 8, "\x52\x4F\x4C\x4C\x42\x41\x43\x4B\x00" }, /*ROLLBACK*/
'\0' /* -- critical --------------- */
};
static LDAPControl *hcdTC_rollback[3] = { &hcdTransaction_rollback, &hcdTransactionId, NULL };