Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/*
int i, ret=LDB_SUCCESS;
struct ldb_cmdline *options;
- ldb_global_init();
+ ldb = ldb_init(NULL, NULL);
- ldb = ldb_init(NULL);
+ if (ldb_transaction_start(ldb) != 0) {
+ printf("Failed to start transaction: %s\n", ldb_errstring(ldb));
+ exit(1);
+ }
options = ldb_cmdline_process(ldb, argc, argv, usage);
}
}
+ if (count != 0 && ldb_transaction_commit(ldb) != 0) {
+ printf("Failed to commit transaction: %s\n", ldb_errstring(ldb));
+ exit(1);
+ }
+
talloc_free(ldb);
printf("Modified %d records with %d failures\n", count, failures);