From: Arran Cudbard-Bell Date: Thu, 3 Nov 2016 19:23:38 +0000 (-0400) Subject: Better debugging X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec751a7bc77b877d4da5fd5b1dea0c960bd55917;p=thirdparty%2Ffreeradius-server.git Better debugging --- diff --git a/src/modules/rlm_sigtran/sccp.c b/src/modules/rlm_sigtran/sccp.c index d043388108e..2822e681d5a 100644 --- a/src/modules/rlm_sigtran/sccp.c +++ b/src/modules/rlm_sigtran/sccp.c @@ -178,14 +178,14 @@ int sigtran_tcap_outgoing(UNUSED struct msgb *msg_in, void *ctx, sigtran_transac txn->ctx.invoke_id++; /* Needs to be two operations */ txn->ctx.invoke_id &= 0x7f; /* Invoke ID is 7bits */ - RDEBUG2("OTID %u Invoke ID %u", txn->ctx.otid, txn->ctx.invoke_id); + RDEBUG2("Sending request with OTID %u Invoke ID %u", txn->ctx.otid, txn->ctx.invoke_id); if (!rbtree_insert(txn_tree, txn)) { RERROR("Failed inserting transaction, maybe at txn limit?"); txn->response.type = SIGTRAN_RESPONSE_FAIL; - if (write(txn->ctx.ofd->fd, &txn, sizeof(txn)) < 0) { + if (sigtran_event_submit(ofd, txn) < 0) { ERROR("Failed informing event client of result: %s", fr_syserror(errno)); return -1; } @@ -243,7 +243,7 @@ static int sigtran_tcap_incoming(struct msgb *msg, UNUSED unsigned int length, U // find.ctx.invoke_id = *(msg->l3h + 0x34); find.ctx.invoke_id = 1; /* Always 1 for now... */ - DEBUG2("DTID %u Invoke ID %u", find.ctx.otid, find.ctx.invoke_id); + DEBUG2("Received response with DTID %u Invoke ID %u", find.ctx.otid, find.ctx.invoke_id); /* * Lookup the transaction in our tree of outstanding transactions