Browse Source

pdb: avoid child re-init

- for mi cmd when used over xmlrpc module
(cherry picked from commit bc34a82fbf5bd903cc50cb34c73afb7b685603a7)
Daniel-Constantin Mierla 15 years ago
parent
commit
56d19db4ae
1 changed files with 6 additions and 3 deletions
  1. 6 3
      modules/pdb/pdb.c

+ 6 - 3
modules/pdb/pdb.c

@@ -667,17 +667,20 @@ static int mod_init(void)
 	return 0;
 }
 
-
 static int child_init (int rank)
 {
-	if (init_server_socket() != 0) return -1;
-	return 0;
+	return mi_child_init();
 }
 
 
+static int pdb_child_initialized = 0;
+
 static int mi_child_init(void)
 {
+	if(pdb_child_initialized)
+		return 0;
 	if (init_server_socket() != 0) return -1;
+	pdb_child_initialized = 1;
 	return 0;
 }