Browse code

secsipid: log message on identity generation failure

(cherry picked from commit 4b7eedf5af9a461d5a1de1148c814faa5db8cbaa)

Daniel-Constantin Mierla authored on 31/05/2021 13:02:01
Showing 1 changed files
... ...
@@ -327,6 +327,7 @@ static int ki_secsipid_add_identity(sip_msg_t *msg, str *origtn, str *desttn,
327 327
 			attest->s, origid->s, x5u->s, keypath->s, &ibody.s);
328 328
 
329 329
 	if(ibody.len<=0) {
330
+		LM_ERR("failed to get identity header body (%d)\n", ibody.len);
330 331
 		goto error;
331 332
 	}
332 333
 
... ...
@@ -526,9 +527,7 @@ static int secsipid_libopt_param(modparam_t type, void *val)
526 527
 		return -1;
527 528
 	}
528 529
 	sit->s = *((str*)val);
529
-	if(secsipid_libopt_list!=NULL) {
530
-		sit->next = secsipid_libopt_list;
531
-	}
530
+	sit->next = secsipid_libopt_list;
532 531
 	secsipid_libopt_list = sit;
533 532
 
534 533
 	return 0;