[ekiga] Better debug messages in the services code



commit 3021f08bec7c1e812e51ff0604611b461df37c6d
Author: Julien Puydt <julien puydt laposte net>
Date:   Fri Jun 27 17:19:12 2014 +0200

    Better debug messages in the services code

 lib/engine/framework/services.cpp |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/lib/engine/framework/services.cpp b/lib/engine/framework/services.cpp
index ca9b78c..f0ce0d5 100644
--- a/lib/engine/framework/services.cpp
+++ b/lib/engine/framework/services.cpp
@@ -102,11 +102,14 @@ Ekiga::ServiceCore::~ServiceCore ()
                << iter->first
                << " has "
                << service.use_count() - 1
-               << " dangling references)"
+               << " dangling references"
                << std::endl;
     }
   }
-  std::cout << "(which means " << count << " leaked services)" << std::endl;
+  if (count)
+    std::cout << "  (which means " << count << " leaked services)" << std::endl;
+  else
+    std::cout << "  (no service leaked)" << std::endl;
 #endif
 }
 
@@ -172,23 +175,14 @@ Ekiga::ServiceCore::get (const std::string name)
 #if DEBUG
 
   if (result)
-    if (closed)
-      std::cout << "Ekiga::ServiceCore refuses to return " << name << std::endl;
-    else
-      std::cout << "Ekiga::ServiceCore returns " << name << std::endl;
+    std::cout << "Ekiga::ServiceCore returns " << name << std::endl;
   else
     std::cout << "Ekiga::ServiceCore doesn't have " << name << std::endl;
 
-  if (closed)
-    raise (SIGSEGV);
-
-  return result;
-
-#else
+#endif
 
   return result;
 
-#endif
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]