If keyspace notifications are used at all, the respective objects and
threads must be created during startup. This requires at least some
keyspace to be configured. To support usage without any keyspaces
initially (and add them during runtime), add a special case (set
keyspace to -1).
Convert all keyspace variables to signed ints. Ignore negative keyspace
numbers where appropriate. Support Redis endpoint addresses without
database number.
Fixes#1902
Change-Id: I45a3c87bc515f9b14e64ec1ec0906dde271b5f8d
{"port-max",'M',0,G_OPTION_ARG_INT,&rtpe_config.port_max,"Highest port to use for RTP","INT"},
{"port-max",'M',0,G_OPTION_ARG_INT,&rtpe_config.port_max,"Highest port to use for RTP","INT"},
{"redis",'r',0,G_OPTION_ARG_STRING,&redisps,"Connect to Redis database","[PW@]IP:PORT/INT"},
{"redis",'r',0,G_OPTION_ARG_STRING,&redisps,"Connect to Redis database","[PW@]IP:PORT/INT"},
{"redis-write",'w',0,G_OPTION_ARG_STRING,&redisps_write,"Connect to Redis write database","[PW@]IP:PORT/INT"},
{"redis-write",'w',0,G_OPTION_ARG_STRING,&redisps_write,"Connect to Redis write database","[PW@]IP:PORT/INT"},
{"redis-subscribe",0,0,G_OPTION_ARG_STRING,&redisps_subscribe,"Connect to Redis subscribe database","[PW@]IP:PORT/INT"},
{"redis-subscribe",0,0,G_OPTION_ARG_STRING,&redisps_subscribe,"Connect to Redis subscribe database","[PW@]IP:PORT[/INT]"},
{"redis-resolve-on-reconnect",0,0,G_OPTION_ARG_NONE,&rtpe_config.redis_resolve_on_reconnect,"Re-resolve given FQDN on each re-connect to the redis server.",NULL},
{"redis-resolve-on-reconnect",0,0,G_OPTION_ARG_NONE,&rtpe_config.redis_resolve_on_reconnect,"Re-resolve given FQDN on each re-connect to the redis server.",NULL},
{"redis-num-threads",0,0,G_OPTION_ARG_INT,&rtpe_config.redis_num_threads,"Number of Redis restore threads","INT"},
{"redis-num-threads",0,0,G_OPTION_ARG_INT,&rtpe_config.redis_num_threads,"Number of Redis restore threads","INT"},
{"redis-expires",0,0,G_OPTION_ARG_INT,&rtpe_config.redis_expires_secs,"Expire time in seconds for redis keys","INT"},
{"redis-expires",0,0,G_OPTION_ARG_INT,&rtpe_config.redis_expires_secs,"Expire time in seconds for redis keys","INT"},