mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve SSLHTTPPeer asynchronous shutdown
This commit is contained in:
committed by
Nik Bougalis
parent
d98c4992dd
commit
d289512aeb
@@ -46,17 +46,18 @@ public:
|
||||
}
|
||||
|
||||
char* duplicateStringValue ( const char* value,
|
||||
unsigned int length = unknown ) override
|
||||
unsigned int length = unknown ) override
|
||||
{
|
||||
//@todo invesgate this old optimization
|
||||
//@todo investigate this old optimization
|
||||
//if ( !value || value[0] == 0 )
|
||||
// return 0;
|
||||
|
||||
if ( length == unknown )
|
||||
length = (unsigned int)strlen (value);
|
||||
length = value ? (unsigned int)strlen ( value ) : 0;
|
||||
|
||||
char* newString = static_cast<char*> ( malloc ( length + 1 ) );
|
||||
memcpy ( newString, value, length );
|
||||
if ( value )
|
||||
memcpy ( newString, value, length );
|
||||
newString[length] = 0;
|
||||
return newString;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user