mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Fixing issue 193
This commit is contained in:
parent
c77169b7e9
commit
6bccf64a5e
5
redis.c
5
redis.c
@ -1614,12 +1614,15 @@ static void loadServerConfig(char *filename) {
|
||||
char buf[REDIS_CONFIGLINE_MAX+1], *err = NULL;
|
||||
int linenum = 0;
|
||||
sds line = NULL;
|
||||
char *errormsg = "Fatal error, can't open config file '%s'";
|
||||
char *errorbuf = zmalloc(sizeof(char)*(strlen(errormsg)+strlen(filename)));
|
||||
sprintf(errorbuf, errormsg, filename);
|
||||
|
||||
if (filename[0] == '-' && filename[1] == '\0')
|
||||
fp = stdin;
|
||||
else {
|
||||
if ((fp = fopen(filename,"r")) == NULL) {
|
||||
redisLog(REDIS_WARNING,"Fatal error, can't open config file");
|
||||
redisLog(REDIS_WARNING, errorbuf);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user