--- parser3/src/lib/smtp/smtp.C 2012/03/16 09:24:12 1.9 +++ parser3/src/lib/smtp/smtp.C 2026/04/25 13:38:46 1.18 @@ -1,8 +1,8 @@ /** @file Parser: SMTP sender. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian Parts of the code here is based upon an early gensock and blat */ @@ -10,12 +10,12 @@ #include "pa_exception.h" #include "smtp.h" -volatile const char * IDENT_SMTP_C="$Id: smtp.C,v 1.9 2012/03/16 09:24:12 moko Exp $" IDENT_SMTP_H; +volatile const char * IDENT_SMTP_C="$Id: smtp.C,v 1.18 2026/04/25 13:38:46 moko Exp $" IDENT_SMTP_H; -#undef snprintf // pa_common.C -extern int __snprintf(char *, size_t, const char* , ...); -#define snprintf __snprintf +#undef snprintf +extern int pa_snprintf(char *, size_t, const char* , ...); +#define snprintf pa_snprintf //#define DEBUG_SHOW @@ -27,15 +27,15 @@ SMTP::SMTP() { in_buffer_total = 0; out_buffer_total = 0; - in_buffer = (char *)malloc(SOCKET_BUFFER_SIZE); - out_buffer = (char *)malloc(SOCKET_BUFFER_SIZE); + in_buffer = (char *)pa_malloc(SOCKET_BUFFER_SIZE); + out_buffer = (char *)pa_malloc(SOCKET_BUFFER_SIZE); last_winsock_error = 0; } SMTP::~SMTP() { - free(in_buffer); - free(out_buffer); + pa_free(in_buffer); + pa_free(out_buffer); } @@ -98,7 +98,7 @@ GetBuffer(int wait) if( (retval = select(1+the_socket, &fds, NULL, NULL, &timeout))<0 ) { -#ifdef WIN32 +#ifdef _MSC_VER int error_code = WSAGetLastError(); if( error_code == WSAEINPROGRESS && wait )