[sr-dev] git:master:9d1e8e25: rtpengine: print command in log message on timeout

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 21 09:31:41 CET 2018


Module: kamailio
Branch: master
Commit: 9d1e8e256e49968776f7abb740a6d02739547ec2
URL: https://github.com/kamailio/kamailio/commit/9d1e8e256e49968776f7abb740a6d02739547ec2

Author: Surendra Tiwari <surendratiwari3 at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-11-21T09:30:06+01:00

rtpengine: print command in log message on timeout

- few indentation fixes
- GH #1732

---

Modified: src/modules/rtpengine/rtpengine.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9d1e8e256e49968776f7abb740a6d02739547ec2.diff
Patch: https://github.com/kamailio/kamailio/commit/9d1e8e256e49968776f7abb740a6d02739547ec2.patch

---

diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 2ca9219e71..4074385b1d 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -2630,7 +2630,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
 		}
 		v[0].iov_base = gencookie();
 		v[0].iov_len = strlen(v[0].iov_base);
-        rtpengine_retr = cfg_get(rtpengine,rtpengine_cfg,rtpengine_retr);
+		rtpengine_retr = cfg_get(rtpengine,rtpengine_cfg,rtpengine_retr);
 		for (i = 0; i < rtpengine_retr; i++) {
 			do {
 				len = writev(rtpp_socks[node->idx], v, vcnt + 1);
@@ -2640,14 +2640,14 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
 				LM_ERR("can't send command \"%.*s\" to RTP proxy <%s>\n", out.len, out.s, node->rn_url.s);
 				goto badproxy;
 			}
-            rtpengine_tout_ms = cfg_get(rtpengine,rtpengine_cfg,rtpengine_tout_ms);
+			rtpengine_tout_ms = cfg_get(rtpengine,rtpengine_cfg,rtpengine_tout_ms);
 			while ((poll(fds, 1, rtpengine_tout_ms) == 1) &&
 				(fds[0].revents & POLLIN) != 0) {
 				do {
 					len = recv(rtpp_socks[node->idx], buf, sizeof(buf)-1, 0);
 				} while (len == -1 && errno == EINTR);
 				if (len <= 0) {
-					LM_ERR("can't read reply from RTP proxy <%s>\n", node->rn_url.s);
+					LM_ERR("can't read reply for command \"%.*s\" from RTP proxy <%s>\n", out.len, out.s, node->rn_url.s);
 					goto badproxy;
 				}
 				if (len >= (v[0].iov_len - 1) &&
@@ -2664,7 +2664,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
 			}
 		}
 		if (i == rtpengine_retr) {
-			LM_ERR("timeout waiting reply from RTP proxy <%s>\n", node->rn_url.s);
+			LM_ERR("timeout waiting reply for command \"%.*s\" from RTP proxy <%s>\n", out.len, out.s, node->rn_url.s);
 			goto badproxy;
 		}
 	}




More information about the sr-dev mailing list