diff options
author | Patrick McHardy <kaber@trash.net> | 2010-05-27 19:18:59 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-07-24 21:49:43 +0200 |
commit | 931c335680caa01cc556845b1da43aafdcc46a69 (patch) | |
tree | a0bbec722f61a568f046c2b995b9900deefd105a /src/ss.c | |
parent | af0bbb786bf994e3b2499b317149609e3a58564f (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |