mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Changing disabled devices on pool switch is not possible if remove-disabled is set (enabled)
This commit is contained in:
parent
7507790880
commit
40894db5d2
14
sgminer.c
14
sgminer.c
@ -6028,8 +6028,13 @@ static void apply_initial_gpu_settings(struct pool *pool)
|
|||||||
devices_enabled[i] = false;
|
devices_enabled[i] = false;
|
||||||
|
|
||||||
//assign pool devices if any
|
//assign pool devices if any
|
||||||
if(!empty_string((opt = get_pool_setting(pool->devices, ((!empty_string(default_profile.devices))?default_profile.devices:"all")))))
|
if(!empty_string((opt = get_pool_setting(pool->devices, ((!empty_string(default_profile.devices))?default_profile.devices:"all"))))) {
|
||||||
|
if (opt_removedisabled) {
|
||||||
|
applog(LOG_ERR, "Changing enabled devices is not possible when remove-disabled is set.");
|
||||||
|
} else {
|
||||||
set_devices((char *)opt);
|
set_devices((char *)opt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//lookup gap
|
//lookup gap
|
||||||
if(!empty_string((opt = get_pool_setting(pool->lookup_gap, default_profile.lookup_gap))))
|
if(!empty_string((opt = get_pool_setting(pool->lookup_gap, default_profile.lookup_gap))))
|
||||||
@ -6364,9 +6369,14 @@ static void get_work_prepare_thread(struct thr_info *mythr, struct work *work)
|
|||||||
devices_enabled[i] = false;
|
devices_enabled[i] = false;
|
||||||
|
|
||||||
//assign pool devices if any
|
//assign pool devices if any
|
||||||
if(!empty_string((opt = get_pool_setting(work->pool->devices, ((!empty_string(default_profile.devices))?default_profile.devices:"all")))))
|
if(!empty_string((opt = get_pool_setting(work->pool->devices, ((!empty_string(default_profile.devices))?default_profile.devices:"all"))))) {
|
||||||
|
if (opt_removedisabled) {
|
||||||
|
applog(LOG_ERR, "Changing enabled devices is not possible when remove-disabled is set.");
|
||||||
|
} else {
|
||||||
set_devices((char *)opt);
|
set_devices((char *)opt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//lookup gap
|
//lookup gap
|
||||||
if(opt_isset(options, SWITCHER_APPLY_LG))
|
if(opt_isset(options, SWITCHER_APPLY_LG))
|
||||||
|
Loading…
Reference in New Issue
Block a user