Author: tridge Date: 2005-09-22 05:31:16 +0000 (Thu, 22 Sep 2005) New Revision: 10411
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10411 Log: we don't need the 10 times retry on rid allocation now, as transactions ensure two account creations can't interfere with each other Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c =================================================================== --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c 2005-09-22 05:03:03 UTC (rev 10410) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c 2005-09-22 05:31:16 UTC (rev 10411) @@ -179,7 +179,7 @@ struct ldb_message **res = NULL; const struct ldb_dn *dom_dn; uint32_t rid; - int ret, tries = 10; + int ret; struct dom_sid *dom_sid, *obj_sid; /* get the domain component part of the provided dn */ @@ -213,15 +213,7 @@ } /* allocate a new Rid for the domain */ - - /* we need to try multiple times to cope with two account - creations at the same time */ - while (tries--) { - ret = samldb_allocate_next_rid(module->ldb, mem_ctx, dom_dn, &rid); - if (ret != 1) { - break; - } - } + ret = samldb_allocate_next_rid(module->ldb, mem_ctx, dom_dn, &rid); if (ret != 0) { ldb_debug(module->ldb, LDB_DEBUG_FATAL, "Failed to increment nextRid of %s\n", ldb_dn_linearize(mem_ctx, dom_dn)); talloc_free(res);
