diff options
Diffstat (limited to 'src/rdb.c')
-rw-r--r-- | src/rdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1303,8 +1303,8 @@ int rdbSaveRio(rio *rdb, int *error, int rdbflags, rdbSaveInfo *rsi) { * the script cache as well: on successful PSYNC after a restart, we need * to be able to process any EVALSHA inside the replication backlog the * master will send us. */ - if (rsi && dictSize(server.lua_scripts)) { - di = dictGetIterator(server.lua_scripts); + if (rsi && dictSize(evalScriptsDict())) { + di = dictGetIterator(evalScriptsDict()); while((de = dictNext(di)) != NULL) { robj *body = dictGetVal(de); if (rdbSaveAuxField(rdb,"lua",3,body->ptr,sdslen(body->ptr)) == -1) @@ -2808,7 +2808,7 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi, redisDb *dbarray) { if (rsi) rsi->repl_offset = strtoll(auxval->ptr,NULL,10); } else if (!strcasecmp(auxkey->ptr,"lua")) { /* Load the script back in memory. */ - if (luaCreateFunction(NULL,server.lua,auxval) == NULL) { + if (luaCreateFunction(NULL, auxval) == NULL) { rdbReportCorruptRDB( "Can't load Lua script from RDB file! " "BODY: %s", (char*)auxval->ptr); |