Quellcode durchsuchen

Only set the output in trans.sink when not min pwr

When we receive a GotoMin message, we immediately go to lower power
before entering the PE_SRC_Transition_Sink state.  Therefore, the call
to pdb_dpm_output_set was redundant in this case.  Now the call isn't
made in this case, removing the redundancy.  This also leads somewhat
into the design of the new library.
Clara Hobbs vor 6 Jahren
Ursprung
Commit
9ee738b04c
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3
    1
      src/policy_engine.c

+ 3
- 1
src/policy_engine.c Datei anzeigen

@@ -250,7 +250,9 @@ static enum policy_engine_state pe_sink_transition_sink(void)
250 250
             explicit_contract = true;
251 251
 
252 252
             /* Set the output appropriately */
253
-            pdb_dpm_output_set(capability_match && !min_power);
253
+            if (!min_power) {
254
+                pdb_dpm_output_set(capability_match);
255
+            }
254 256
 
255 257
             chPoolFree(&pdb_msg_pool, policy_engine_message);
256 258
             policy_engine_message = NULL;

Laden…
Abbrechen
Speichern