]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix sync connect return values
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Feb 2018 11:59:12 +0000 (11:59 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Feb 2018 11:59:12 +0000 (11:59 +0000)
src/lua/lua_redis.c

index b845b6d49b42629cce08fd07dba795a08a9afa5b..7688d8cfd728c3516f203ca30f1be792d1b95b51 100644 (file)
@@ -1124,6 +1124,7 @@ lua_redis_connect_sync (lua_State *L)
                        return 2;
                }
 
+               lua_pushboolean (L, TRUE);
                pctx = lua_newuserdata (L, sizeof (ctx));
                *pctx = ctx;
                rspamd_lua_setclass (L, "rspamd{redis}", -1);
@@ -1139,7 +1140,7 @@ lua_redis_connect_sync (lua_State *L)
                return 2;
        }
 
-       return 1;
+       return 2;
 }
 
 /***