Record of NS_Simulator bug fixed.
来源:互联网 发布:windows汉语意思 编辑:程序博客网 时间:2024/05/22 00:18
In "RunController.h":
/*
Modify in 2012_04_07:
@1: modify the ~RunController(), in which MNs can be destruct without any obstruct, and guide MNs to destroy their pkts in buffer.
*/
In "Node.h":
/*
Modify in 2012_04_07:
@1: modify the Clear_MNs_Pkts(), and add the DestroyPkts() function into it;
@2: modify the ReceiveAndStorePkt( int nPktType, char* pPkt), every MN should keep its own pkts buffer, not the pointer to the source MN's newed pkt.
*/
Display the modified ReceiveAndStorePkt function here:
// ---------------- ReceiveAndStorePkt:
// Create a new Packet depend on the pSrcPkt, and store it into its buffer Storage.
void MNode::ReceiveAndStorePkt( _in int nPktType, _in char* pSrcPkt)
{
assert( NULL != pSrcPkt);
if ( NULL == pSrcPkt)
{
LogFile::instance()->m_ofErrLog << "Error: in MNode::StorePkt, NULL == pSrcPkt.\n";
return;
}
// 1) Copy and Store the received Pkt, !! must create a new pPkt_dataPiece here.
char* pPktData = new char[PIECESIZE+1];
memset( pPktData, 0, PIECESIZE+1 );
memcpy( pPktData, pSrcPkt, PIECESIZE );
this->m_map_PktID__PktType_pData.insert( make_pair(m_nPktID, make_pair( nPktType, pPktData )) );
m_nPktID++; // every time, the PktID++.
// ...
}
// ------------- ReceiveAndStorePkt:~
- Record of NS_Simulator bug fixed.
- Fixed a BUG of VC++ 6.0
- bug fixed
- KernelBugFixing - A day in the life of a fixed bug
- IE6 fixed bug
- bootstrap bug fixed
- Record of circos usage
- 一个bug至今没有fixed
- bug fixed 系列之一:前言
- A record for OF installation
- To record command of git
- 修正IE6不支持position:fixed的bug
- 修正IE6不支持position:fixed的bug
- IE6 position:fixed bug (固定窗口方法)
- IE6下position:fixed的bug解决
- 修正IE6不支持position:fixed的bug
- 修正IE6不支持position.fixed的bug
- 修正IE6不支持position:fixed的bug
- Fedora16 安装配置 Tomcat
- 腾讯笔试
- 9种不同的服务器程序设计范式
- ARM学习之路(一) linux操作指令学习..(by 星空武哥)
- 不再纠结Java中的String类
- Record of NS_Simulator bug fixed.
- Heritrix3.0教程 源码分析(一) Heritrix 3.0新特性新功能介绍
- strust2 ognl例子
- 4月7日网络安全小总结
- 在tomcat的server.xml中配置数据库连接池和手动部署到tomcat
- ubuntu下无线网设置
- Struts2+Jquery实现Aajx
- android content provider 使用
- 驯服爬虫 Heritrix