tcp: Make TCP options thread-safe
This commit is contained in:
@@ -70,7 +70,6 @@ TcpOption::CreateOption (uint8_t kind)
|
||||
TypeId tid;
|
||||
};
|
||||
|
||||
static ObjectFactory objectFactory;
|
||||
static kindToTid toTid[] =
|
||||
{
|
||||
{ TcpOption::END, TcpOptionEnd::GetTypeId () },
|
||||
@@ -87,6 +86,7 @@ TcpOption::CreateOption (uint8_t kind)
|
||||
{
|
||||
if (toTid[i].kind == kind)
|
||||
{
|
||||
ObjectFactory objectFactory;
|
||||
objectFactory.SetTypeId (toTid[i].tid);
|
||||
return objectFactory.Create<TcpOption> ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user