filter-buffer: Add status_changed callback processing
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Tue, 1 Mar 2016 05:37:03 +0000 (13:37 +0800)
committerJason Wang <jasowang@redhat.com>
Tue, 8 Mar 2016 07:34:18 +0000 (15:34 +0800)
commitf1b2bc601af5037f0af6d55575e619b912e348b5
tree7abf1334c4d819bba8c8e3a9ce347394ad0b462d
parent338d3f415e131673ea51719b0c30edf65f69d806
filter-buffer: Add status_changed callback processing

While the status of filter-buffer changing from 'on' to 'off',
it need to release all the buffered packets, and delete the related
timer, while switch from 'off' to 'on', it need to resume the release
packets timer.

Here, we extract the process of setup timer into a new helper,
which will be used in the new status_changed callback.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Yang Hongyang <hongyang.yang@easystack.cn>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/filter-buffer.c