[ekiga] Added some compiled-out debug statements to Ekiga::ServiceCore
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Added some compiled-out debug statements to Ekiga::ServiceCore
- Date: Thu, 21 Oct 2010 18:54:18 +0000 (UTC)
commit 16d1b7258115bddaa73924155b88aebf1d656f78
Author: Snark <jpuydt gnome org>
Date: Thu Oct 21 11:53:10 2010 +0200
Added some compiled-out debug statements to Ekiga::ServiceCore
I can confirm there are some strange things happening during startup,
and anormal things during runtime!
lib/engine/framework/services.cpp | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/framework/services.cpp b/lib/engine/framework/services.cpp
index 3b61913..63c6ac9 100644
--- a/lib/engine/framework/services.cpp
+++ b/lib/engine/framework/services.cpp
@@ -33,7 +33,15 @@
*
*/
+
+/* set DEBUG to 1 and the service core will tell whenever something is added or
+ * asked to it...
+ */
+#define DEBUG 0
+
+#if DEBUG
#include <iostream>
+#endif
#include "services.h"
@@ -52,7 +60,6 @@ Ekiga::ServiceCore::add (ServicePtr service)
bool result = false;
if ( !get (service->get_name ())) {
-
services.push_front (service);
service_added (service);
result = true;
@@ -60,6 +67,12 @@ Ekiga::ServiceCore::add (ServicePtr service)
result = false;
}
+#if DEBUG
+ if (result)
+ std::cout << "Ekiga::ServiceCore added " << service->get_name () << std::endl;
+ else
+ std::cout << "Ekiga::ServiceCore already has " << service->get_name () << std::endl;
+#endif
return result;
}
@@ -76,6 +89,15 @@ Ekiga::ServiceCore::get (const std::string name)
result = *iter;
}
+
+
+#if DEBUG
+ if (result)
+ std::cout << "Ekiga::ServiceCore returns " << name << std::endl;
+ else
+ std::cout << "Ekiga::ServiceCore doesn't have " << name << std::endl;
+#endif
+
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]