]> sjero.net Git - linphone/commitdiff
Increment tries in loop that have a maximum number of tries.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Thu, 25 Apr 2013 09:17:11 +0000 (11:17 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Thu, 25 Apr 2013 09:17:11 +0000 (11:17 +0200)
coreapi/sal_eXosip2.c

index e577b6422ad43b4de8802e232456eae23eb7c477..222e7c329a0df37786bfecc793fe04bd9ae3be72 100644 (file)
@@ -2400,6 +2400,7 @@ int sal_register_refresh(SalOp *op, int expires){
                * the exosip lock in a non blocking way, and give up if it takes too long*/\r
                while (eXosip_trylock()!=0){\r
                        ms_usleep(100000);\r
                * the exosip lock in a non blocking way, and give up if it takes too long*/\r
                while (eXosip_trylock()!=0){\r
                        ms_usleep(100000);\r
+                       tries++;\r
                        if (tries>30) {/*after 3 seconds, give up*/\r
                                ms_warning("Could not obtain exosip lock in a reasonable time, giving up.");\r
                                return -1;\r
                        if (tries>30) {/*after 3 seconds, give up*/\r
                                ms_warning("Could not obtain exosip lock in a reasonable time, giving up.");\r
                                return -1;\r