diff options
-rw-r--r-- | gisi/client.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gisi/client.c b/gisi/client.c index 0f5bfa12..01ec396d 100644 --- a/gisi/client.c +++ b/gisi/client.c @@ -387,14 +387,16 @@ static gboolean g_isi_callback(GIOChannel *channel, GIOCondition cond, msg = (uint8_t *)buf; - if (cl->debug_func) - cl->debug_func(msg, len, cl->debug_data); - if (indication) { /* Message ID at offset 1 */ id = msg[1]; if (cl->ind.func[id] == NULL) return TRUE; /* Unsubscribed indication */ + + if (cl->debug_func) + cl->debug_func(msg + 1, len - 1, + cl->debug_data); + cl->ind.func[id](cl, msg + 1, len - 1, obj, cl->ind.data[id]); } else { @@ -402,6 +404,11 @@ static gboolean g_isi_callback(GIOChannel *channel, GIOCondition cond, id = msg[0]; if (cl->func[id] == NULL) return TRUE; /* Bad transaction ID */ + + if (cl->debug_func) + cl->debug_func(msg + 1, len - 1, + cl->debug_data); + if ((cl->func[id])(cl, msg + 1, len - 1, obj, cl->data[id])) g_isi_request_cancel(g_isi_req(cl, id)); |