=== modified file 'src/network/nAuthentication.cpp' --- src/network/nAuthentication.cpp 2008-09-15 19:25:12 +0000 +++ src/network/nAuthentication.cpp 2008-09-17 12:56:56 +0000 @@ -236,8 +236,9 @@ { private: #ifdef HAVE_PTHREAD - static void DoCall(nMemberFunctionRunnerTemplate*o) { - ((o->object_)->*(o->function_))(); + static void* DoCall( void *o ) { + nMemberFunctionRunnerTemplate * functionRunner = (nMemberFunctionRunnerTemplate*) o; + ( (functionRunner->object_)->*(functionRunner->function_) )(); } #endif public: @@ -266,8 +267,10 @@ if ( !tRecorder::IsRunning() ) { #ifdef HAVE_PTHREAD + nMemberFunctionRunnerTemplate * runner = new nMemberFunctionRunnerTemplate( object, function ); + pthread_t thread; - pthread_create(&thread, NULL, DoCall, (void*)(new nMemberFunctionRunnerTemplate( object, function ))); + pthread_create(&thread, NULL, (nMemberFunctionRunnerTemplate::DoCall), (void*) runner); #else static nExecutor executor; executor.execute( ZThread::Task( new nMemberFunctionRunnerTemplate( object, function ) ) ); @@ -341,7 +344,7 @@ }; template< class T > -std::deque< nMemberFunctionRunnerTemplate > +std::deque< nMemberFunctionRunnerTemplate > nMemberFunctionRunnerTemplate::pendingForBreak_; // convenience wrapper @@ -374,7 +377,7 @@ { if ( block ) { -#ifdef HAVE_LIBZTHREAD +#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD) ScheduleBackground( object, function ); #else ScheduleBreak( object, function ); @@ -406,7 +409,7 @@ // inform the user about delays bool delays = false; -#ifdef HAVE_LIBZTHREAD +#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD) delays = tRecorder::IsRunning(); #endif if ( delays )