Browse code

secsipid: propagate return code from lib functions

Daniel-Constantin Mierla authored on 20/04/2021 08:35:50
Showing 1 changed files
... ...
@@ -223,7 +223,7 @@ static int ki_secsipid_check_identity(sip_msg_t *msg, str *keypath)
223 223
 	}
224 224
 
225 225
 	LM_DBG("identity check: failed\n");
226
-	return -1;
226
+	return ret;
227 227
 }
228 228
 
229 229
 /**
... ...
@@ -281,7 +281,7 @@ static int ki_secsipid_check_identity_pubkey(sip_msg_t *msg, str *keyval)
281 281
 	}
282 282
 
283 283
 	LM_DBG("identity check: failed\n");
284
-	return -1;
284
+	return ret;
285 285
 }
286 286
 
287 287
 /**
... ...
@@ -466,7 +466,7 @@ static sr_kemi_xval_t* ki_secsipid_get_url(sip_msg_t *msg, str *surl)
466 466
  */
467 467
 static int w_secsipid_get_url(sip_msg_t *msg, char *purl, char *povar)
468 468
 {
469
-	int r;
469
+	int ret;
470 470
 	pv_spec_t *ovar;
471 471
 	pv_value_t val;
472 472
 	str surl = {NULL, 0};
... ...
@@ -484,10 +484,10 @@ static int w_secsipid_get_url(sip_msg_t *msg, char *purl, char *povar)
484 484
 		_secsipid_papi.SecSIPIDSetFileCacheOptions(secsipid_cache_dir.s,
485 485
 				secsipid_cache_expire);
486 486
 	}
487
-	r = _secsipid_papi.SecSIPIDGetURLContent(surl.s, secsipid_timeout,
487
+	ret = _secsipid_papi.SecSIPIDGetURLContent(surl.s, secsipid_timeout,
488 488
 			&_secsipid_get_url_val.s, &_secsipid_get_url_val.len);
489
-	if(r!=0) {
490
-		return -1;
489
+	if(ret!=0) {
490
+		return ret;
491 491
 	}
492 492
 	ovar = (pv_spec_t *)povar;
493 493