Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix weird bug on pstate changes with VM
[simgrid.git] / src / surf / disk_s19.cpp
index 1b7ef1b731088653f197e17867acbfe9bdf82e07..a84c09479172f1bc36c643f91459182f806a14d5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -112,12 +112,12 @@ void DiskS19::apply_event(kernel::profile::Event* triggered, double value)
     set_write_bandwidth(value);
     tmgr_trace_event_unref(&write_bw_.event);
 
-  } else if (triggered == state_event_) {
+  } else if (triggered == get_state_event()) {
     if (value > 0)
       turn_on();
     else
       turn_off();
-    tmgr_trace_event_unref(&state_event_);
+    unref_state_event();
   } else {
     xbt_die("Unknown event!\n");
   }