| 444 | } |
| 445 | |
| 446 | static void luabb_trigger_unregister(Lua L, dbconsumer_t *q) |
| 447 | { |
| 448 | if (q->lock) { |
| 449 | Pthread_mutex_lock(q->lock); |
| 450 | if (*q->status != TRIGGER_SUBSCRIPTION_CLOSED) { |
| 451 | bdb_trigger_unsubscribe(q->iq.usedb->handle); |
| 452 | } |
| 453 | Pthread_mutex_unlock(q->lock); |
| 454 | } |
| 455 | int retry = 10; |
| 456 | do { |
| 457 | int rc = trigger_unregister_req(&q->info); |
| 458 | if (rc == CDB2_TRIG_REQ_SUCCESS || rc == CDB2_TRIG_ASSIGNED_OTHER) return; |
| 459 | if (L) check_retry_conditions(L, &q->info, 1); |
| 460 | } while (--retry); |
| 461 | } |
| 462 | |
| 463 | static int stop_waiting(Lua L, dbconsumer_t *q) |
| 464 | { |
no test coverage detected