执行resetall指令:Sapp重启后发送resetall状态通知SCE清空流表
This commit is contained in:
@@ -47,6 +47,30 @@ void session_table_destory(struct session_table *table)
|
||||
}
|
||||
}
|
||||
|
||||
void session_table_reset(struct session_table *table)
|
||||
{
|
||||
if (table)
|
||||
{
|
||||
struct session_node *temp = NULL;
|
||||
struct session_node *node = NULL;
|
||||
HASH_ITER(hh1, table->root_by_id, node, temp)
|
||||
{
|
||||
HASH_DELETE(hh1, table->root_by_id, node);
|
||||
HASH_DELETE(hh2, table->root_by_addr, node);
|
||||
|
||||
if (node->val_freecb && node->val_data)
|
||||
{
|
||||
node->val_freecb(node->val_data);
|
||||
}
|
||||
|
||||
free(node);
|
||||
node = NULL;
|
||||
|
||||
table->session_node_count--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t session_table_count(struct session_table *table)
|
||||
{
|
||||
if (table)
|
||||
|
||||
Reference in New Issue
Block a user