chan_ooh323: fix rtptimeout general value checking
authorAlexandr Anikin <may@telecom-service.ru>
Wed, 15 Oct 2014 10:03:05 +0000 (10:03 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Wed, 15 Oct 2014 10:03:05 +0000 (10:03 +0000)
correct condition to check rtptimeout in [general] config section

ASTERISK-24393 #close
Reported by:  Dmitry Melekhov
Tested by:  Dmitry Melekhov
Patches:
  ASTERISK-24393.patch
........

Merged revisions 425547 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 425548 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 425589 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425590 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425591 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c

index 1a9ab38..da63f03 100644 (file)
@@ -2988,7 +2988,7 @@ int reload_config(int reload)
                        gNat = ast_true(v->value);
                } else if (!strcasecmp(v->name, "rtptimeout")) {
                        gRTPTimeout = atoi(v->value);
                        gNat = ast_true(v->value);
                } else if (!strcasecmp(v->name, "rtptimeout")) {
                        gRTPTimeout = atoi(v->value);
-                       if (gRTPTimeout <= 0)
+                       if (gRTPTimeout < 0)
                                gRTPTimeout = 60;
                } else if (!strcasecmp(v->name, "tos")) {
                        if (sscanf(v->value, "%30i", &format) == 1)
                                gRTPTimeout = 60;
                } else if (!strcasecmp(v->name, "tos")) {
                        if (sscanf(v->value, "%30i", &format) == 1)