mirror of
https://github.com/ENSL/NS.git
synced 2025-03-26 04:01:02 +00:00
Debug build config. Works on server dll. Thanks Neoptolemus!
This commit is contained in:
parent
c7acee5e87
commit
52630598ad
12 changed files with 538 additions and 105 deletions
|
@ -1,6 +1,6 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.6.33712.159
|
||||
VisualStudioVersion = 17.6.33723.286
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cl_dll.dll", "cl_dll\cl_dll.vcxproj", "{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
@ -8,9 +8,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cl_dll.dll", "cl_dll\cl_dll
|
|||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ns.dll", "dlls\hl.vcxproj", "{BC87A180-F17B-83FC-5D7D-470FAD003ABC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5AADD469-7488-4B34-A9FD-01CFAC5972FD} = {5AADD469-7488-4B34-A9FD-01CFAC5972FD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "particles", "particles\particles.vcxproj", "{5AADD469-7488-4B34-A9FD-01CFAC5972FD}"
|
||||
EndProject
|
||||
|
@ -24,8 +21,8 @@ Global
|
|||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Debug|Win32.ActiveCfg = Playtest|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Debug|Win32.Build.0 = Playtest|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Debug|Win32.ActiveCfg = client - debug|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Debug|Win32.Build.0 = client - debug|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Developer - debug|Win32.ActiveCfg = Playtest|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Developer - debug|Win32.Build.0 = Playtest|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Developer - release|Win32.ActiveCfg = Playtest|Win32
|
||||
|
@ -36,9 +33,10 @@ Global
|
|||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Playtest|Win32.Build.0 = Playtest|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Release|Win32.ActiveCfg = Playtest|Win32
|
||||
{665C1DAF-9248-E06F-4E5C-A664BAFDE9D8}.Release|Win32.Build.0 = Playtest|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Debug|Win32.ActiveCfg = Developer - release|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Debug|Win32.Build.0 = Developer - release|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Debug|Win32.ActiveCfg = Developer - debug|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Debug|Win32.Build.0 = Developer - debug|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Developer - debug|Win32.ActiveCfg = Developer - debug|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Developer - debug|Win32.Build.0 = Developer - debug|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Developer - release|Win32.ActiveCfg = Developer - release|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Playtest - balance disabled|Win32.ActiveCfg = Playtest - balance disabled|Win32
|
||||
{BC87A180-F17B-83FC-5D7D-470FAD003ABC}.Playtest - balance disabled|Win32.Build.0 = Playtest - balance disabled|Win32
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">
|
||||
<LocalDebuggerCommand>..\..\..\..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Half-Life\hl.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommand>C:\Program Files (x86)\Steam\steamapps\common\Half-Life\hl.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments> -allowdebug -dev -steam -game ns</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerAttach>false</LocalDebuggerAttach>
|
||||
<LocalDebuggerDebuggerType>Auto</LocalDebuggerDebuggerType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='client - debug|Win32'">
|
||||
<LocalDebuggerCommand>C:\Program Files (x86)\Steam\steamapps\common\Half-Life\hl.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments> -allowdebug -dev -steam -game ns</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>..\..</LocalDebuggerWorkingDirectory>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Developer - release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
|
@ -85,6 +86,9 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">
|
||||
<CustomBuildAfterTargets />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">
|
||||
<TargetName>ns</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Developer - release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Full</Optimization>
|
||||
|
@ -140,8 +144,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_SECURE_PRERELEASE_BUILD;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DEBUG;DEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;USE_OLDAUTH;AVH_NO_NEXUS</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
|
@ -150,7 +154,7 @@
|
|||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
|
@ -158,10 +162,10 @@
|
|||
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\includes\lua\include;$(SolutionDir)\particles\;$(SolutionDir)\includes\vgui\include;$(SolutionDir)\includes\libcurl-7.50-nossl\include;$(SolutionDir)\common;$(SolutionDir)\public;$(SolutionDir)\util;$(SolutionDir)\engine;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;ws2_32.lib;particles.lib;liblua.lib;liblualib.lib;nexus_server.lib;ssleay32.lib;libeay32.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(SolutionDir)..\dlls\ns.dll</OutputFile>
|
||||
<AdditionalDependencies>particles.lib;lua5.1.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(SolutionDir)..\dlls\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>U:\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>U:\debug;$(SolutionDir)\Debug;$(SolutionDir)includes\libcurl-7.50-nossl;$(SolutionDir)includes\vgui\lib\win32_vc6;$(SolutionDir)includes\lua\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>.\hl.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -195,7 +199,7 @@
|
|||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_NO_NEXUS;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_NO_NEXUS;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -254,7 +258,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_NO_NEXUS;SERVER;AVH_PLAYTEST_BUILD;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
|
|
|
@ -1501,7 +1501,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther )
|
|||
//=========================================================
|
||||
int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon )
|
||||
{
|
||||
int iReturn;
|
||||
int iReturn = 0;
|
||||
|
||||
if ( pszAmmo1() != NULL )
|
||||
{
|
||||
|
@ -1524,7 +1524,7 @@ int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon )
|
|||
//=========================================================
|
||||
int CBasePlayerWeapon::ExtractClipAmmo( CBasePlayerWeapon *pWeapon )
|
||||
{
|
||||
int iAmmo;
|
||||
int iAmmo = 0;
|
||||
|
||||
if ( m_iClip == WEAPON_NOCLIP )
|
||||
{
|
||||
|
|
|
@ -69,7 +69,8 @@ DBG_AssertFunction(
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
_assert((void*)szExpr, (void*)szFile, szLine);
|
||||
//_assert((void*)szExpr, (void*)szFile, szLine);
|
||||
assert(fExpr);
|
||||
#else
|
||||
assert(fExpr);
|
||||
#endif
|
||||
|
|
|
@ -706,7 +706,7 @@ typedef struct alias_t {
|
|||
|
||||
void TestAlias()
|
||||
{
|
||||
cmdalias_t* alias = gEngfuncs.pfnGetAliases();// *(alias_s**)0x02d29b7c;
|
||||
cmdalias_t* alias = gEngfuncs.pfnGetAliasList();// *(alias_s**)0x02d29b7c;
|
||||
while(alias)
|
||||
{
|
||||
gEngfuncs.Con_Printf("%s=%s\n%x - %x\n", alias->name, alias->value, alias, gEngfuncs);
|
||||
|
|
|
@ -9692,8 +9692,8 @@ void AvHPlayer::UpdateFog()
|
|||
if(this->mClientCurrentFogEntity != this->mCurrentFogEntity)
|
||||
{
|
||||
bool theFogEnabled = this->mCurrentFogEntity > -1;
|
||||
int theR, theG, theB;
|
||||
float theStart, theEnd;
|
||||
int theR = 0, theG = 0, theB = 0;
|
||||
float theStart = 0.0f, theEnd = 0.0f;
|
||||
|
||||
if(theFogEnabled)
|
||||
{
|
||||
|
|
|
@ -1575,7 +1575,7 @@ void AvHTeam::UpdateTeamStructures()
|
|||
|
||||
// Fill in hive status
|
||||
int theStatus = kHiveInfoStatusBuilt;
|
||||
int theBuildTime;
|
||||
int theBuildTime = 0;
|
||||
|
||||
// Unbuilt hives
|
||||
if(theEntity->pev->team == 0)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>particles</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
@ -50,7 +50,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_ITERATOR_DEBUG_LEVEL=2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
|
|
@ -262,7 +262,7 @@ char *stackTrace( int skipAssert ) {
|
|||
}
|
||||
break;
|
||||
case 'M':
|
||||
OUTS "%f", *a );
|
||||
OUTS "%u", *a );
|
||||
break;
|
||||
case 'N':
|
||||
// TODO
|
||||
|
|
|
@ -228,94 +228,97 @@ void runAssertBox( void* inWnd ) {
|
|||
#endif
|
||||
|
||||
int emailMsgTo( char *msg, char *emailAddress ) {
|
||||
struct hostent *hostEnt;
|
||||
int ip = 0;
|
||||
sockaddr_in sockAddr;
|
||||
int sockFD;
|
||||
int _send, _recv, _connect;
|
||||
char *computerName = "";
|
||||
char *emailAt;
|
||||
char *s = (char *)alloca( strlen(msg) + 256 ); // send buffer
|
||||
char r[2048]; // recv buffer
|
||||
|
||||
#ifdef WIN32
|
||||
WSAData wsaData;
|
||||
int ret = WSAStartup(0x0101, &wsaData);
|
||||
if( ret != 0 ) goto error;
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////// 2021 - Unused library removal. Uncomment and reinclude libcurl to add back. ////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//struct hostent *hostEnt;
|
||||
//int ip = 0;
|
||||
//sockaddr_in sockAddr;
|
||||
//int sockFD;
|
||||
//int _send, _recv, _connect;
|
||||
//char *computerName = "";
|
||||
//char *emailAt;
|
||||
//char *s = (char *)alloca( strlen(msg) + 256 ); // send buffer
|
||||
//char r[2048]; // recv buffer
|
||||
//
|
||||
//#ifdef WIN32
|
||||
// WSAData wsaData;
|
||||
// int ret = WSAStartup(0x0101, &wsaData);
|
||||
// if( ret != 0 ) goto error;
|
||||
//#endif
|
||||
|
||||
sockFD = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||
if( sockFD < 0 ) goto error;
|
||||
//sockFD = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||
//if( sockFD < 0 ) goto error;
|
||||
|
||||
// Parse the emailAddress to get the copmuter name after the '@'
|
||||
emailAt = strchr( emailAddress, '@' );
|
||||
if( emailAt ) {
|
||||
computerName = emailAt+1;
|
||||
}
|
||||
//// Parse the emailAddress to get the copmuter name after the '@'
|
||||
//emailAt = strchr( emailAddress, '@' );
|
||||
//if( emailAt ) {
|
||||
// computerName = emailAt+1;
|
||||
//}
|
||||
|
||||
ip = inet_addr( computerName );
|
||||
if( ip == INADDR_NONE ) {
|
||||
hostEnt = gethostbyname( computerName );
|
||||
if( hostEnt ) {
|
||||
ip = *(int *)hostEnt->h_addr;
|
||||
}
|
||||
}
|
||||
memset( &sockAddr, 0, sizeof(sockAddr) );
|
||||
sockAddr.sin_family = AF_INET;
|
||||
sockAddr.sin_port = htons(25); // 25 = SMTP port
|
||||
sockAddr.sin_addr.s_addr = ip;
|
||||
//ip = inet_addr( computerName );
|
||||
//if( ip == INADDR_NONE ) {
|
||||
// hostEnt = gethostbyname( computerName );
|
||||
// if( hostEnt ) {
|
||||
// ip = *(int *)hostEnt->h_addr;
|
||||
// }
|
||||
//}
|
||||
//memset( &sockAddr, 0, sizeof(sockAddr) );
|
||||
//sockAddr.sin_family = AF_INET;
|
||||
//sockAddr.sin_port = htons(25); // 25 = SMTP port
|
||||
//sockAddr.sin_addr.s_addr = ip;
|
||||
|
||||
_connect = connect( sockFD, (struct sockaddr *)&sockAddr, sizeof(sockAddr) );
|
||||
if( _connect < 0 ) goto error;
|
||||
//_connect = connect( sockFD, (struct sockaddr *)&sockAddr, sizeof(sockAddr) );
|
||||
//if( _connect < 0 ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
if( r[0] != '2' ) goto error;
|
||||
//memset( r, 0, 256 );
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//if( r[0] != '2' ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
sprintf( s, "HELO overmind.org\r\n" );
|
||||
_send = send( sockFD, s, strlen(s), 0 );
|
||||
if( _send < 0 ) goto error;
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
if( r[0] != '2' ) goto error;
|
||||
//memset( r, 0, 256 );
|
||||
//sprintf( s, "HELO overmind.org\r\n" );
|
||||
//_send = send( sockFD, s, strlen(s), 0 );
|
||||
//if( _send < 0 ) goto error;
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//if( r[0] != '2' ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
sprintf( s, "MAIL FROM: ns-assert@overmind.org\r\n" );
|
||||
_send = send( sockFD, s, strlen(s), 0 );
|
||||
if( _send < 0 ) goto error;
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
if( r[0] != '2' ) goto error;
|
||||
//memset( r, 0, 256 );
|
||||
//sprintf( s, "MAIL FROM: ns-assert@overmind.org\r\n" );
|
||||
//_send = send( sockFD, s, strlen(s), 0 );
|
||||
//if( _send < 0 ) goto error;
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//if( r[0] != '2' ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
sprintf( s, "RCPT TO: %s\r\n", emailAddress );
|
||||
_send = send( sockFD, s, strlen(s), 0 );
|
||||
if( _send < 0 ) goto error;
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
if( r[0] != '2' ) goto error;
|
||||
//memset( r, 0, 256 );
|
||||
//sprintf( s, "RCPT TO: %s\r\n", emailAddress );
|
||||
//_send = send( sockFD, s, strlen(s), 0 );
|
||||
//if( _send < 0 ) goto error;
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//if( r[0] != '2' ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
sprintf( s, "DATA\r\n" );
|
||||
_send = send( sockFD, s, strlen(s), 0 );
|
||||
if( _send < 0 ) goto error;
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
if( r[0] != '3' ) goto error;
|
||||
//memset( r, 0, 256 );
|
||||
//sprintf( s, "DATA\r\n" );
|
||||
//_send = send( sockFD, s, strlen(s), 0 );
|
||||
//if( _send < 0 ) goto error;
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//if( r[0] != '3' ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
sprintf( s, "From ns-assert@overmind.org\r\nSubject: NS Assert\r\n%s\r\n.\r\n", msg );
|
||||
_send = send( sockFD, s, strlen(s), 0 );
|
||||
if( _send < 0 ) goto error;
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
if( r[0] != '2' ) goto error;
|
||||
//memset( r, 0, 256 );
|
||||
//sprintf( s, "From ns-assert@overmind.org\r\nSubject: NS Assert\r\n%s\r\n.\r\n", msg );
|
||||
//_send = send( sockFD, s, strlen(s), 0 );
|
||||
//if( _send < 0 ) goto error;
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//if( r[0] != '2' ) goto error;
|
||||
|
||||
memset( r, 0, 256 );
|
||||
sprintf( s, "QUIT\r\n" );
|
||||
_send = send( sockFD, s, strlen(s), 0 );
|
||||
if( _send < 0 ) goto error;
|
||||
_recv = recv( sockFD, r, 256, 0 );
|
||||
CLOSESOCKET( sockFD );
|
||||
//memset( r, 0, 256 );
|
||||
//sprintf( s, "QUIT\r\n" );
|
||||
//_send = send( sockFD, s, strlen(s), 0 );
|
||||
//if( _send < 0 ) goto error;
|
||||
//_recv = recv( sockFD, r, 256, 0 );
|
||||
//CLOSESOCKET( sockFD );
|
||||
return 1;
|
||||
|
||||
error:
|
||||
CLOSESOCKET( sockFD );
|
||||
return 0;
|
||||
//error:
|
||||
//CLOSESOCKET( sockFD );
|
||||
//return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue