From: Jaco Kroon Date: Sun, 17 Apr 2016 20:37:53 +0000 (+0200) Subject: chan_sip: Don't verify table if rtupdate=no X-Git-Tag: 14.0.0-beta1~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f06ce7f90ad39f86cea909e198f4925c5cd9ce70;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2a6dd77e7c..d927f06e39 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -35267,17 +35267,19 @@ static int load_module(void) /* 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();