[prev in list] [next in list] [prev in thread] [next in thread]
List: serdev
Subject: [sr-dev] git:master:6f332ba8: tm: print af and proto as strings in log messages
From: Daniel-Constantin Mierla via sr-dev <sr-dev () lists ! kamailio ! org>
Date: 2023-09-26 11:31:45
Message-ID: E1ql6I5-0005cS-LA () www ! kamailio ! org
[Download RAW message or body]
Module: kamailio
Branch: master
Commit: 6f332ba8329f1dcbeeb00badc499580eb1ff98cf
URL: https://github.com/kamailio/kamailio/commit/6f332ba8329f1dcbeeb00badc499580eb1ff98cf
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date: 2023-09-26T13:30:56+02:00
tm: print af and proto as strings in log messages
---
Modified: src/modules/tm/t_fwd.c
---
Diff: https://github.com/kamailio/kamailio/commit/6f332ba8329f1dcbeeb00badc499580eb1ff98cf.diff
Patch: https://github.com/kamailio/kamailio/commit/6f332ba8329f1dcbeeb00badc499580eb1ff98cf.patch
---
diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c
index ae5f7c04805..816568b18ea 100644
--- a/src/modules/tm/t_fwd.c
+++ b/src/modules/tm/t_fwd.c
@@ -470,9 +470,11 @@ static int prepare_new_uac(struct cell *t, struct sip_msg *i_req, int branch,
/* check if send_sock is ok */
if(t->uac[branch].request.dst.send_sock == 0) {
- LM_ERR("can't fwd to af %d, proto %d "
+ LM_ERR("can't fwd to af %d (%s), proto %d (%s)"
" (no corresponding listening socket)\n",
- dst->to.s.sa_family, dst->proto);
+ dst->to.s.sa_family,
+ get_af_name((unsigned int)dst->to.s.sa_family), dst->proto,
+ get_proto_name((unsigned int)dst->proto));
ret = E_NO_SOCKET;
goto error01;
}
@@ -878,10 +880,13 @@ static int add_uac_from_buf(struct cell *t, struct sip_msg *request, str *uri,
/* check if send_sock is ok */
if(t->uac[branch].request.dst.send_sock == 0) {
- LM_ERR("can't fwd to af %d, proto %d"
+ LM_ERR("can't fwd to af %d (%s), proto %d (%s)"
" (no corresponding listening socket)\n",
t->uac[branch].request.dst.to.s.sa_family,
- t->uac[branch].request.dst.proto);
+ get_af_name((unsigned int)t->uac[branch]
+ .request.dst.to.s.sa_family),
+ t->uac[branch].request.dst.proto,
+ get_proto_name((unsigned int)t->uac[branch].request.dst.proto));
ret = ser_error = E_NO_SOCKET;
goto error;
}
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-leave@lists.kamailio.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic