|
Lines 317-323
Link Here
|
| 317 |
dbi = mdb_cursor_dbi(write_cursor_p); |
353 |
dbi = mdb_cursor_dbi(write_cursor_p); |
| 318 |
rv = mdb_cursor_open(txn, dbi, &local_read_cursor_p); |
354 |
rv = mdb_cursor_open(txn, dbi, &local_read_cursor_p); |
| 319 |
if (rv != MDB_SUCCESS) { |
355 |
if (rv != MDB_SUCCESS) { |
| 320 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "%s: mdb_cursor_open: %s (%d)", __func__, ldap_err2string(rv), rv); |
356 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, |
|
|
357 |
"%s: mdb_cursor_open: %s (%d)", |
| 358 |
__func__, ldap_err2string(rv), rv); |
| 321 |
abort(); |
359 |
abort(); |
| 322 |
return rv; |
360 |
return rv; |
| 323 |
} |
361 |
} |
|
Lines 324-335
Link Here
|
| 324 |
|
362 |
|
| 325 |
rv = dntree_has_children(local_read_cursor_p, dnid); |
363 |
rv = dntree_has_children(local_read_cursor_p, dnid); |
| 326 |
if (rv == MDB_SUCCESS) { |
364 |
if (rv == MDB_SUCCESS) { |
| 327 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "%s: delete failed:" |
365 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_INFO, |
| 328 |
" subordinate objects must be deleted first", |
366 |
"%s: delete failed:" |
|
|
367 |
" subordinate objects must be deleted first", |
| 329 |
__func__); |
368 |
__func__); |
| 330 |
return -1; |
369 |
return MDB_SUCCESS; |
| 331 |
} else if (rv != MDB_NOTFOUND) { |
370 |
} else if (rv != MDB_NOTFOUND) { |
| 332 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "%s: dntree_has_children failed: %s (%d)", __func__, mdb_strerror(rv), rv); |
371 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, |
|
|
372 |
"%s: dntree_has_children failed: %s (%d)", |
| 373 |
__func__, mdb_strerror(rv), rv); |
| 333 |
abort(); |
374 |
abort(); |
| 334 |
return -1; |
375 |
return -1; |
| 335 |
} |
376 |
} |
|
Lines 344-354
Link Here
|
| 344 |
rv = mdb_cursor_get(write_cursor_p, &key, &data, MDB_SET); |
385 |
rv = mdb_cursor_get(write_cursor_p, &key, &data, MDB_SET); |
| 345 |
if (rv == MDB_SUCCESS) { |
386 |
if (rv == MDB_SUCCESS) { |
| 346 |
rv = mdb_cursor_del(write_cursor_p, 0); |
387 |
rv = mdb_cursor_del(write_cursor_p, 0); |
|
|
388 |
if (rv != MDB_SUCCESS) |
| 389 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, |
| 390 |
"%s: failed for node id=%lu: %s (%d)", |
| 391 |
__func__, dnid, mdb_strerror(rv), rv); |
| 392 |
abort(); |
| 393 |
} |
| 347 |
} |
394 |
} |
|
|
395 |
} else { |
| 396 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, |
| 397 |
"%s: failed for link id=%lu: %s (%d)", |
| 398 |
__func__, dnid, mdb_strerror(rv), rv); |
| 399 |
abort(); |
| 348 |
} |
400 |
} |
| 349 |
|
401 |
|
| 350 |
if (rv == MDB_SUCCESS) { |
402 |
if (rv == MDB_SUCCESS) { |
| 351 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_INFO, "%s: deleted id=%lu", __func__, dnid); |
403 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_INFO, |
|
|
404 |
"%s: deleted id=%lu", |
| 405 |
__func__, dnid); |
| 352 |
} |
406 |
} |
| 353 |
|
407 |
|
| 354 |
return rv; |
408 |
return rv; |