mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
handle I2NP message per destination
This commit is contained in:
parent
6d6c81bf8b
commit
202109ebeb
8 changed files with 28 additions and 14 deletions
14
Garlic.cpp
14
Garlic.cpp
|
@ -382,19 +382,13 @@ namespace garlic
|
|||
{
|
||||
case eGarlicDeliveryTypeLocal:
|
||||
LogPrint ("Garlic type local");
|
||||
i2p::HandleI2NPMessage (CreateI2NPMessage (buf, GetI2NPMessageLength (buf), from));
|
||||
HandleI2NPMessage (buf, len);
|
||||
break;
|
||||
case eGarlicDeliveryTypeDestination:
|
||||
{
|
||||
case eGarlicDeliveryTypeDestination:
|
||||
LogPrint ("Garlic type destination");
|
||||
buf += 32; // destination. check it later or for multiple destinations
|
||||
I2NPHeader * header = (I2NPHeader *)buf;
|
||||
if (header->typeID == eI2NPData)
|
||||
HandleDataMessage (buf + sizeof (I2NPHeader), be16toh (header->size));
|
||||
else
|
||||
LogPrint ("Unexpected I2NP garlic message ", (int)header->typeID);
|
||||
break;
|
||||
}
|
||||
HandleI2NPMessage (buf, len);
|
||||
break;
|
||||
case eGarlicDeliveryTypeTunnel:
|
||||
{
|
||||
LogPrint ("Garlic type tunnel");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue