Browse code

uac: registration refresh should in half time of expire

Surendra Tiwari authored on 06/06/2021 11:03:14
Showing 1 changed files
... ...
@@ -1205,7 +1205,7 @@ int uac_reg_update(reg_uac_t *reg, time_t tn)
1205 1205
 		reg->flags |= UAC_REG_INIT;
1206 1206
 	}
1207 1207
 
1208
-	if(reg->timer_expires > tn + reg_timer_interval + 3)
1208
+	if ((reg->expires/2) < reg->timer_expires - tn)
1209 1209
 		return 3;
1210 1210
 
1211 1211
 	return uac_reg_send(reg, tn);