From 4b18b115a4377abc3ac9e5b898f004ca3ac7c2c6 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 25 Apr 2013 11:17:11 +0200 Subject: [PATCH] Increment tries in loop that have a maximum number of tries. --- coreapi/sal_eXosip2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index e577b642..222e7c32 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -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*/ while (eXosip_trylock()!=0){ ms_usleep(100000); + tries++; if (tries>30) {/*after 3 seconds, give up*/ ms_warning("Could not obtain exosip lock in a reasonable time, giving up."); return -1; -- 2.39.2