Csocket again

<@x-x> psychon: merge new csocket :>


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@866 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-11-10 22:25:51 +00:00
parent 294c82a983
commit 4c5d81b2a3
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -28,7 +28,7 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* $Revision: 1.60 $
* $Revision: 1.61 $
*/
#include "Csocket.h"
@@ -390,17 +390,17 @@ void SSLErrors( const char *filename, u_int iLineNum )
}
#endif /* HAVE_LIBSSL */
void __Perror( const CS_STRING & s )
void __Perror( const CS_STRING & s, const char *pszFile, unsigned int iLineNo )
{
#if defined(__sun) || defined(_WIN32) || __NetBSD_Version__ < 4000000000
CS_DEBUG( s << ": " << strerror( GetSockError() ) );
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): " << strerror( GetSockError() ) << endl;
#else
char buff[512];
memset( (char *)buff, '\0', 512 );
if ( strerror_r( GetSockError(), buff, 511 ) == 0 )
CS_DEBUG( s << ": " << buff );
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): " << buff << endl;
else
CS_DEBUG( s << ": Unknown Error Occured" );
std::cerr << s << "(" << pszFile << ":" << iLineNo << "): Unknown Error Occured " << endl;
#endif /* __sun */
}