summaryrefslogtreecommitdiffstats
path: root/src/ss.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-05-27 19:18:59 +0200
committerPatrick McHardy <kaber@trash.net>2010-07-24 21:49:43 +0200
commit931c335680caa01cc556845b1da43aafdcc46a69 (patch)
treea0bbec722f61a568f046c2b995b9900deefd105a /src/ss.c
parentaf0bbb786bf994e3b2499b317149609e3a58564f (diff)
debug: make debugging more colorful
Add definitions for the various libdect subsystems, pass them to the registered debugging handlers and add a handler to the example programs to colorize debugging messages. Still could use some cleanup, but causes too many clashes. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/ss.c')
-rw-r--r--src/ss.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ss.c b/src/ss.c
index e8293f8..434ffc8 100644
--- a/src/ss.c
+++ b/src/ss.c
@@ -68,7 +68,7 @@ static DECT_SFMT_MSG_DESC(ciss_facility,
);
#define __ss_debug(pfx, fmt, args...) \
- dect_debug("%sSS (link %d): " fmt "\n", pfx, \
+ dect_debug(DECT_DEBUG_SS, "%sSS (link %d): " fmt "\n", pfx, \
(sse)->transaction.link ? (sse)->transaction.link->dfd->fd : -1, \
## args)
@@ -288,7 +288,7 @@ static void dect_ciss_rcv_register(struct dect_handle *dh,
struct dect_mnss_param *param;
struct dect_ss_endpoint *sse;
- dect_debug("CISS-REGISTER");
+ dect_debug(DECT_DEBUG_SS, "CISS-REGISTER");
if (dect_parse_sfmt_msg(dh, &ciss_register_msg_desc, &msg.common, mb) < 0)
return;
@@ -320,7 +320,7 @@ static void dect_ciss_open(struct dect_handle *dh,
const struct dect_transaction *req,
struct dect_msg_buf *mb)
{
- dect_debug("SS: unknown transaction: msg type: %x\n", mb->type);
+ dect_debug(DECT_DEBUG_SS, "SS: unknown transaction: msg type: %x\n", mb->type);
switch (mb->type) {
case CISS_REGISTER:
return dect_ciss_rcv_register(dh, req, mb);