komodo message hooks
This commit is contained in:
25
src/komodo.h
Normal file
25
src/komodo.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* Copyright © 2014-2016 The SuperNET Developers. *
|
||||||
|
* *
|
||||||
|
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
|
||||||
|
* the top-level directory of this distribution for the individual copyright *
|
||||||
|
* holder information and the developer policies on copyright and licensing. *
|
||||||
|
* *
|
||||||
|
* Unless otherwise agreed in a custom licensing agreement, no part of the *
|
||||||
|
* SuperNET software, including this file may be copied, modified, propagated *
|
||||||
|
* or distributed except according to the terms contained in the LICENSE file *
|
||||||
|
* *
|
||||||
|
* Removal or modification of this copyright notice is prohibited. *
|
||||||
|
* *
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef H_KOMODO_H
|
||||||
|
#define H_KOMODO_H
|
||||||
|
|
||||||
|
int32_t "C" komodo_checkmsg(char *ipaddr,uint8_t *data,int32_t datalen)
|
||||||
|
{
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
#include "komodo.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#include "sodium.h"
|
#include "sodium.h"
|
||||||
@@ -5078,8 +5079,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Ignore unknown commands for extensibility
|
if ( komodo_checkmsg(pfrom->addr.ToString(),vRecv.begin(),nMessageSize) < 0 )
|
||||||
LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id);
|
LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand),pfrom->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user