Browse Source

Fixed SEGFAULT for RTPENGINE-64

pull/225/head
Frederic-Philippe Metz 10 years ago
parent
commit
1ee88db282
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      daemon/redis.c

+ 10
- 2
daemon/redis.c View File

@ -265,13 +265,21 @@ void onRedisNotification(redisAsyncContext *actx, void *reply, void *privdata) {
void redis_notify(void *d) {
struct callmaster *cm = d;
struct redis *r = cm->conf.redis;
struct redis *r = 0;
if (cm->conf.redis_read) {
r = cm->conf.redis_read;
} else if (cm->conf.redis) {
r = cm->conf.redis;
} else {
rlog(LOG_INFO,"Neither redis master nor redis_read configured. redis notification aborted.");
return;
}
struct event_base *base = event_base_new();
redisAsyncContext *c = redisAsyncConnect(r->host, r->endpoint.port);
if (c->err) {
printf("error: %s\n", c->errstr);
rlog(LOG_ERROR, "error: %s\n", c->errstr);
return;
}


Loading…
Cancel
Save