From 227909e2cf0039737dc52872651837fe5f1702b5 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 17 Sep 2010 19:20:07 -0400 Subject: Rejig of some of the socket stuff. Fixed marking sockets as nonblocking on Windows. Added in a LastError function to keep having to use strerror/GetLastError everywhere. --- src/threadengines/threadengine_pthread.cpp | 2 +- src/threadengines/threadengine_win32.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/threadengines') diff --git a/src/threadengines/threadengine_pthread.cpp b/src/threadengines/threadengine_pthread.cpp index f63cc066e..fb0b29506 100644 --- a/src/threadengines/threadengine_pthread.cpp +++ b/src/threadengines/threadengine_pthread.cpp @@ -47,7 +47,7 @@ void ThreadEngine::Start(Thread *thread) if (pthread_create(&thread->Handle, &threadengine_attr, entry_point, thread)) { delete thread; - throw CoreException(Anope::string("Unable to create thread: ") + strerror(errno)); + throw CoreException(Anope::string("Unable to create thread: ") + Anope::LastError()); } } diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp index a07a75cce..b67f01681 100644 --- a/src/threadengines/threadengine_win32.cpp +++ b/src/threadengines/threadengine_win32.cpp @@ -43,7 +43,7 @@ void ThreadEngine::Start(Thread *thread) if (!thread->Handle) { delete thread; - throw CoreException(Anope::string("Unable to create thread: ") + dlerror()); + throw CoreException(Anope::string("Unable to create thread: ") + LastError()); } } -- cgit