Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'battery-get-name' into 'master'
[simgrid.git] / src / kernel / actor / CommObserver.cpp
index 7aa715de010414d15ffc8662780c2737d23914b1..d860c8c221e5f49d058d915261a6a1b2ff1e5e6f 100644 (file)
@@ -222,8 +222,8 @@ void CommIsendSimcall::serialize(std::stringstream& stream) const
 }
 std::string CommIsendSimcall::to_string() const
 {
-  return "CommAsyncSend(comm_id: " + std::to_string(comm_->get_id()) + " mbox:" + std::to_string(mbox_->get_id()) +
-         " tag: " + std::to_string(tag_) + ")";
+  return "CommAsyncSend(comm_id: " + std::to_string((comm_ ? comm_->get_id() : 0)) + " mbox:" +
+         std::to_string(mbox_->get_id()) + " tag: " + std::to_string(tag_) + ")";
 }
 
 void CommIrecvSimcall::serialize(std::stringstream& stream) const
@@ -237,8 +237,8 @@ void CommIrecvSimcall::serialize(std::stringstream& stream) const
 
 std::string CommIrecvSimcall::to_string() const
 {
-  return "CommAsyncRecv(comm_id: " + std::to_string(comm_->get_id()) + " mbox:" + std::to_string(mbox_->get_id()) +
-         " tag: " + std::to_string(tag_) + ")";
+  return "CommAsyncRecv(comm_id: " + std::to_string((comm_ ? comm_->get_id() : 0)) + " mbox:" +
+         std::to_string(mbox_->get_id()) + " tag: " + std::to_string(tag_) + ")";
 }
 
 void MessIputSimcall::serialize(std::stringstream& stream) const