Browse Source

usrloc: coonect to db from rpc processes

- evapi consumers are using rpc rank and there can be save/lookup
  operations
- reported by GH #622
Daniel-Constantin Mierla 9 years ago
parent
commit
ee11732bdc
1 changed files with 4 additions and 2 deletions
  1. 4 2
      modules/usrloc/ul_mod.c

+ 4 - 2
modules/usrloc/ul_mod.c

@@ -421,8 +421,10 @@ static int child_init(int _rank)
 			return 0;
 		case DB_ONLY:
 		case WRITE_THROUGH:
-			/* connect to db only from SIP workers, TIMER and MAIN processes */
-			if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN)
+			/* connect to db only from SIP workers, TIMER and MAIN processes,
+			 *  and RPC processes */
+			if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN
+					 && _rank!=PROC_RPC)
 				return 0;
 			break;
 		case WRITE_BACK: