fix: ensure that copy bricks are always cancelled upon module unload

This commit is contained in:
Thomas Schoebel-Theuer 2011-10-18 11:07:53 +02:00 committed by Thomas Schoebel-Theuer
parent 13ca3a8563
commit 1d5124b76f
2 changed files with 2 additions and 1 deletions

View File

@ -2960,6 +2960,7 @@ static int light_thread(void *data)
status = mars_dent_work(&_global, "/mars", sizeof(struct mars_dent), light_checker, light_worker, &_global, 3);
MARS_DBG("worker status = %d\n", status);
status = mars_kill_brick_when_possible(&_global, &_global.brick_anchor, false, (void*)&copy_brick_type);
status = mars_kill_brick_when_possible(&_global, &_global.brick_anchor, false, (void*)&client_brick_type);
MARS_DBG("kill client bricks (when possible) = %d\n", status);
status = mars_kill_brick_when_possible(&_global, &_global.brick_anchor, false, (void*)&aio_brick_type);

View File

@ -1156,7 +1156,7 @@ struct mars_brick *make_brick_all(
va_start(args, prev_count);
if (switch_fmt) {
switch_state = false;
if (switch_fmt[0]) {
if (switch_fmt[0] && global && global->global_power.button) {
switch_path = vpath_make(switch_fmt, &args);
}
}