[Asterisk-code-review] chan sip: Don't verify table if rtupdate=no (asterisk[11])

Joshua Colp asteriskteam at digium.com
Mon Apr 18 08:49:46 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: chan_sip: Don't verify table if rtupdate=no
......................................................................


chan_sip: Don't verify table if rtupdate=no

If rtupdate=no do not verify sipregs/peers table has updatable fields.

ASTERISK-25934 #close

Change-Id: Iaa2c53037b93daccc7e7333c40d61861847b856d
---
M channels/chan_sip.c
1 file changed, 13 insertions(+), 11 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved
  George Joseph: Looks good to me, but someone else must approve



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5173fc2..0ebfec8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -34978,17 +34978,19 @@
 	/* And start the monitor for the first time */
 	restart_monitor();
 
-	ast_realtime_require_field(ast_check_realtime("sipregs") ? "sipregs" : "sippeers",
-		"name", RQ_CHAR, 10,
-		"ipaddr", RQ_CHAR, INET6_ADDRSTRLEN - 1,
-		"port", RQ_UINTEGER2, 5,
-		"regseconds", RQ_INTEGER4, 11,
-		"defaultuser", RQ_CHAR, 10,
-		"fullcontact", RQ_CHAR, 35,
-		"regserver", RQ_CHAR, 20,
-		"useragent", RQ_CHAR, 20,
-		"lastms", RQ_INTEGER4, 11,
-		SENTINEL);
+	if (sip_cfg.peer_rtupdate) {
+		ast_realtime_require_field(ast_check_realtime("sipregs") ? "sipregs" : "sippeers",
+			"name", RQ_CHAR, 10,
+			"ipaddr", RQ_CHAR, INET6_ADDRSTRLEN - 1,
+			"port", RQ_UINTEGER2, 5,
+			"regseconds", RQ_INTEGER4, 11,
+			"defaultuser", RQ_CHAR, 10,
+			"fullcontact", RQ_CHAR, 35,
+			"regserver", RQ_CHAR, 20,
+			"useragent", RQ_CHAR, 20,
+			"lastms", RQ_INTEGER4, 11,
+			SENTINEL);
+	}
 
 
 	sip_register_tests();

-- 
To view, visit https://gerrit.asterisk.org/2632
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa2c53037b93daccc7e7333c40d61861847b856d
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list