Ver Fonte

topos: restrict storage value to db and redis

Daniel-Constantin Mierla há 8 anos atrás
pai
commit
58c1ab8fa0
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      src/modules/topos/topos_mod.c

+ 6 - 0
src/modules/topos/topos_mod.c

@@ -147,6 +147,12 @@ static int mod_init(void)
 				"provide all functions needed\n");
 			return -1;
 		}
+	} else {
+		if(_tps_storage.len!=7 && strncmp(_tps_storage.s, "redis", 5)!=0) {
+			LM_ERR("unknown storage type: %.*s\n",
+					_tps_storage.len, _tps_storage.s);
+			return -1;
+		}
 	}
 
 	if(_tps_sanity_checks!=0) {