mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 17:04:13 +00:00
extract last parameter
This commit is contained in:
parent
6e905c8f5c
commit
39bd641b39
7
SAM.cpp
7
SAM.cpp
@ -359,9 +359,11 @@ namespace stream
|
|||||||
|
|
||||||
void SAMSocket::ExtractParams (char * buf, size_t len, std::map<std::string, std::string>& params)
|
void SAMSocket::ExtractParams (char * buf, size_t len, std::map<std::string, std::string>& params)
|
||||||
{
|
{
|
||||||
while (char * separator = strchr (buf, ' '))
|
char * separator;
|
||||||
|
do
|
||||||
{
|
{
|
||||||
*separator = 0;
|
separator = strchr (buf, ' ');
|
||||||
|
if (separator) *separator = 0;
|
||||||
char * value = strchr (buf, '=');
|
char * value = strchr (buf, '=');
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
@ -371,6 +373,7 @@ namespace stream
|
|||||||
}
|
}
|
||||||
buf = separator + 1;
|
buf = separator + 1;
|
||||||
}
|
}
|
||||||
|
while (separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAMSocket::Receive ()
|
void SAMSocket::Receive ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user