From: Matthew Nicholson Date: Fri, 4 Mar 2011 19:37:13 +0000 (+0000) Subject: Restore mysterious lua_pushvalue() call removed in r309494. The mystery has been... X-Git-Tag: 1.6.2.19-rc1~3^2~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04a844687d42a21175e48bc9878bcf9ff8868766;p=thirdparty%2Fasterisk.git Restore mysterious lua_pushvalue() call removed in r309494. The mystery has been solved. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@309584 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c index 2f2fd9f7db..c9ac561038 100644 --- a/pbx/pbx_lua.c +++ b/pbx/pbx_lua.c @@ -793,6 +793,10 @@ static int lua_sort_extensions(lua_State *L) int context_name = context - 1; int context_order; + /* copy the context_name to be used as the key for the + * context_order table in the extensions_order table later */ + lua_pushvalue(L, context_name); + /* create the context_order table */ lua_newtable(L); context_order = lua_gettop(L);