[beast/devel: 30/77] SFI: sficomport.cc: use BSE_KEY_DEBUG
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/devel: 30/77] SFI: sficomport.cc: use BSE_KEY_DEBUG
- Date: Wed, 1 May 2013 17:29:51 +0000 (UTC)
commit dec8901b5866aac4f25667d578a808f677c71155
Author: Tim Janik <timj gnu org>
Date: Sun Apr 7 14:52:49 2013 +0200
SFI: sficomport.cc: use BSE_KEY_DEBUG
sfi/sficomport.cc | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/sfi/sficomport.cc b/sfi/sficomport.cc
index 1827bfc..f57cd04 100644
--- a/sfi/sficomport.cc
+++ b/sfi/sficomport.cc
@@ -12,10 +12,9 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
-static SFI_MSG_TYPE_DEFINE (debug_comport, "comport", SFI_MSG_DEBUG, NULL);
-#undef DEBUG // FIXME
-#define DEBUG(...) sfi_debug (debug_comport, __VA_ARGS__)
-#define MASS_DEBUG(...) // DEBUG (__VA_ARGS__) // log every communicated value
+
+#define CDEBUG(...) BSE_KEY_DEBUG ("comport", __VA_ARGS__)
+
/* define the io bottle neck (for writes) to a small value
* (e.g. 20) to trigger and test blocking IO on fast systems
*/
@@ -342,7 +341,7 @@ sfi_com_port_send_bulk (SfiComPort *port,
else
wakeup = first ? link->wakeup2 : link->wakeup1;
link->mutex.unlock();
- MASS_DEBUG ("[%s: sent values]", port->ident);
+ CDEBUG ("[%s: sent values]", port->ident);
if (wakeup)
wakeup();
}
@@ -404,7 +403,7 @@ com_port_read_pending (SfiComPort *port)
/* n==0 on pipes/fifos means remote closed the connection (end-of-file) */
if (n == 0 || (n < 0 && errno != EINTR && errno != EAGAIN && errno != ERESTART))
{
- DEBUG ("%s: during read: remote pipe closed", port->ident);
+ CDEBUG ("%s: during read: remote pipe closed", port->ident);
return FALSE;
}
/* check completed header */
@@ -454,7 +453,7 @@ com_port_read_pending (SfiComPort *port)
/* n==0 on pipes/fifos means remote closed the connection (end-of-file) */
if (n == 0 || (n < 0 && errno != EINTR && errno != EAGAIN && errno != ERESTART))
{
- DEBUG ("%s: during read: remote pipe closed", port->ident);
+ CDEBUG ("%s: during read: remote pipe closed", port->ident);
return FALSE;
}
}
@@ -505,7 +504,7 @@ static GValue*
sfi_com_port_recv_intern (SfiComPort *port,
gboolean blocking)
{
- MASS_DEBUG ("[%s: START receiving]", port->ident);
+ CDEBUG ("[%s: START receiving]", port->ident);
if (!port->rvalues && port->link)
{
SfiComPortLink *link = port->link;
@@ -561,7 +560,7 @@ sfi_com_port_recv_intern (SfiComPort *port,
goto loop_blocking;
}
}
- MASS_DEBUG ("[%s: DONE receiving]", port->ident);
+ CDEBUG ("[%s: DONE receiving]", port->ident);
return port->connected ? (GValue*) sfi_ring_pop_head (&port->rvalues) : NULL;
}
GValue*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]