summaryrefslogtreecommitdiffstats
path: root/src/fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fsm.c')
-rw-r--r--src/fsm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fsm.c b/src/fsm.c
index 276fd60..31ccd87 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -3,6 +3,7 @@
#include "intf.h"
#include "trans.h"
+#include "debug.h"
static int process_release(struct tsnif_handle *h, struct tsnif_term *term)
@@ -12,7 +13,7 @@ static int process_release(struct tsnif_handle *h, struct tsnif_term *term)
term->state = TSNIF_INTF_STATE_DONE;
- TSNIF_DEBUG("type %d, idx %d\n", term->type, term->idx);
+ TSNIF_DEBUG(FSM, "type %d, idx %d\n", term->type, term->idx);
return h->ops->cb_release(term);
}
@@ -32,7 +33,7 @@ static int process_tgroup(struct tsnif_handle *h, struct tsnif_term *term,
err = trans_group(&h->trans, group);
term->state = err ? TSNIF_INTF_STATE_DONE : TSNIF_INTF_STATE_DATA;
- TSNIF_DEBUG("adding group %d, err %d\n", group, err);
+ TSNIF_DEBUG(FSM, "adding group %d, err %d\n", group, err);
return err;
}
@@ -42,7 +43,7 @@ static int process_data(struct tsnif_handle *h,
{
struct tsnif_data data;
- TSNIF_DEBUG("type %d, idx %d\n",
+ TSNIF_DEBUG(FSM, "type %d, idx %d\n",
term->type, term->idx);
if (!h->ops || !h->ops->cb_data)
@@ -61,7 +62,7 @@ static int new(struct tsnif_handle *h,
struct tsnif_term *term,
struct trans_msg *msg)
{
- TSNIF_DEBUG("got data in the NEW state, something is wrong\n");
+ TSNIF_DEBUG(FSM, "got data in the NEW state, something is wrong\n");
return -1;
}
@@ -150,7 +151,7 @@ int fsm_process(struct tsnif_handle *h,
struct tsnif_term *term,
struct trans_msg *msg)
{
- TSNIF_DEBUG("got cmd %d for term type %d, idx %d, state %d\n",
+ TSNIF_DEBUG(FSM, "got cmd %d for term type %d, idx %d, state %d\n",
msg->cmd, term->type, term->idx, term->state);
/* we can get the release command in any state,