batman: Fix adding batteries on Linux.
When we add a batman gadget to the desktop it previously would reset the values of all existing batman instances. Here we ignore the dummy instance used when adding to desktop or a gadget bar.
This commit is contained in:
parent
72a962921c
commit
e9200fb081
|
@ -43,6 +43,12 @@ _batman_udev_stop(Instance *inst)
|
|||
Ac_Adapter *ac;
|
||||
Battery *bat;
|
||||
|
||||
/* This is a dummy battery we return here. */
|
||||
if (inst->cfg->batman.have_battery != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (inst->cfg->batman.batwatch)
|
||||
E_FREE_FUNC(inst->cfg->batman.batwatch, eeze_udev_watch_del);
|
||||
if (inst->cfg->batman.acwatch)
|
||||
|
|
Loading…
Reference in New Issue