From 6bccf64a5e0cf2050da4809a5304bdf797c9d5cf Mon Sep 17 00:00:00 2001 From: Antonio Ognio Date: Fri, 19 Mar 2010 01:01:08 -0500 Subject: [PATCH] Fixing issue 193 --- redis.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redis.c b/redis.c index 7c0a8695..72cdd256 100644 --- a/redis.c +++ b/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); } }