mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-08 20:07:21 +00:00
Low: loop: don't bring runtime down for a trivial API misuse
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
This commit is contained in:
parent
2d2974e0e4
commit
70423655d2
@ -128,10 +128,11 @@ qb_loop_destroy(struct qb_loop *l)
|
||||
void
|
||||
qb_loop_stop(struct qb_loop *l)
|
||||
{
|
||||
if (l == NULL) {
|
||||
default_instance->stop_requested = QB_TRUE;
|
||||
struct qb_loop *apply_loop = (l != NULL) ? l : default_instance;
|
||||
if (apply_loop != NULL) {
|
||||
apply_loop->stop_requested = QB_TRUE;
|
||||
} else {
|
||||
l->stop_requested = QB_TRUE;
|
||||
qb_util_log(LOG_CRIT, "API misuse: cannot stop nonexisting loop");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user