瀏覽代碼

topos: restrict storage value to db and redis

Daniel-Constantin Mierla 8 年之前
父節點
當前提交
58c1ab8fa0
共有 1 個文件被更改,包括 6 次插入0 次删除
  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");
 				"provide all functions needed\n");
 			return -1;
 			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) {
 	if(_tps_sanity_checks!=0) {