18bcd8b
From b71f1d2e8f7ad6853e5e68134a66baf9dea2471b Mon Sep 17 00:00:00 2001
18bcd8b
From: Peter Jones <pjones@redhat.com>
18bcd8b
Date: Wed, 17 Oct 2012 11:26:04 -0400
9e2491c
Subject: [PATCH 09/36] Only try to register OIDs once.
18bcd8b
18bcd8b
Signed-off-by: Peter Jones <pjones@redhat.com>
18bcd8b
---
18bcd8b
 src/cms_common.c | 10 +++++++---
18bcd8b
 1 file changed, 7 insertions(+), 3 deletions(-)
18bcd8b
18bcd8b
diff --git a/src/cms_common.c b/src/cms_common.c
18bcd8b
index 2d51979..6219a2a 100644
18bcd8b
--- a/src/cms_common.c
18bcd8b
+++ b/src/cms_common.c
18bcd8b
@@ -179,11 +179,15 @@ cms_common_log(cms_context *ctx, int priority, char *fmt, ...)
18bcd8b
 int
18bcd8b
 cms_context_init(cms_context *cms)
18bcd8b
 {
18bcd8b
+	static int first_time = 1;
18bcd8b
 	memset(cms, '\0', sizeof (*cms));
18bcd8b
 
18bcd8b
-	SECStatus status = register_oids(cms);
18bcd8b
-	if (status != SECSuccess)
18bcd8b
-		return -1;
18bcd8b
+	if (first_time) {
18bcd8b
+		SECStatus status = register_oids(cms);
18bcd8b
+		if (status != SECSuccess)
18bcd8b
+			return -1;
18bcd8b
+		first_time = 0;
18bcd8b
+	}
18bcd8b
 
18bcd8b
 	cms->log = cms_common_log;
18bcd8b
 
18bcd8b
-- 
18bcd8b
1.7.12.1
18bcd8b