mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
bug fix as reported by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495076, still needs to be tested
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1155 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+6
-2
@@ -235,6 +235,7 @@ public:
|
||||
{
|
||||
perl_destruct(m_pPerl);
|
||||
perl_free(m_pPerl);
|
||||
PERL_SYS_TERM();
|
||||
m_pPerl = NULL;
|
||||
}
|
||||
|
||||
@@ -983,13 +984,16 @@ EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
|
||||
|
||||
bool CModPerl::OnLoad(const CString & sArgs, CString & sMessage)
|
||||
{
|
||||
const int iArgc = 5;
|
||||
const char *pArgv[] = { "", "-e", "0", "-T", "-w", NULL };
|
||||
PERL_SYS_INIT3( &iArgc, &pArgc, NULL );
|
||||
m_pPerl = perl_alloc();
|
||||
perl_construct(m_pPerl);
|
||||
const char *pArgv[] = { "", "-e", "0", "-T", "-w" };
|
||||
|
||||
if (perl_parse(m_pPerl, NULL, 2, (char **)pArgv, (char **)NULL) != 0)
|
||||
if (perl_parse(m_pPerl, NULL, iArgc, (char **)pArgv, (char **)NULL) != 0)
|
||||
{
|
||||
perl_free(m_pPerl);
|
||||
PERL_SYS_TERM();
|
||||
m_pPerl = NULL;
|
||||
return(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user