]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis_snoop: Spying on a single direction continually increases CPU 56/356/4
authorKevin Harwell <kharwell@digium.com>
Mon, 4 May 2015 22:28:08 +0000 (17:28 -0500)
committerKevin Harwell <kharwell@digium.com>
Wed, 6 May 2015 21:09:33 +0000 (16:09 -0500)
commit68513e00f781e4b9e87a8464b725b96050b3c9c3
treefdf50df3356addc2bee2ca359729cada3dcc4615
parentd6ffbe39b0ffac581c341bda01c88bd8eb4f5073
res_stasis_snoop: Spying on a single direction continually increases CPU

Creating a snoop channel in ARI and spying only on a single direction (in or
out) results in CPU utilization continually increasing until the CPU is fully
consumed. This occurs because frames are being put in the opposing direction's
slin factory queue, but not being removed.

Fixed the problem by always reading and disposing of frames from the opposite
queue of the direction selected.

ASTERISK-24938 #closes

Change-Id: I935bfd15f1db958f364d9d6b3b45582c0113dd60
res/res_stasis_snoop.c