diff options
author | Jaco Kroon <jaco@uls.co.za> | 2016-04-17 22:37:53 +0200 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2016-04-18 05:34:51 -0500 |
commit | 22335fe18af85b8086899740cef436b5a59a2ae4 (patch) | |
tree | 681d9275775df035110df89d5f31577e106baea8 | |
parent | c7732a2600d447b950327fe2af0ce0c0b8bd5726 (diff) |
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
-rw-r--r-- | channels/chan_sip.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 91fb0b546..45827b448 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -35170,17 +35170,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(); |