(gdb) up #1 0xb791e7d3 in stop_spying (chan=0x820d9d0, spy=0xb78818b0) at app_chanspy.c:190 190 ast_channel_spy_remove(chan, spy); (gdb) down #0 0x0806272f in ast_channel_spy_remove (chan=0x820d9d0, spy=0xb78818b0) at channel.c:1052 1052 while (curspy->list.next != (spy)) (gdb) l 1047 (&chan->spies->list)->first = (spy)->list.next; 1048 if ((&chan->spies->list)->last == (spy)) 1049 (&chan->spies->list)->last = NULL; 1050 } else { 1051 typeof(spy) curspy = (&chan->spies->list)->first; 1052 while (curspy->list.next != (spy)) 1053 curspy = curspy->list.next; 1054 curspy->list.next = (spy)->list.next; 1055 if ((&chan->spies->list)->last == curspy->list.next) 1056 (&chan->spies->list)->last = curspy; (gdb) p chan->spies $1 = (struct ast_channel_spy_list *) 0x820e400 (gdb) p *chan->spies $2 = {read_translator = {last_format = 4, path = 0x820df60}, write_translator = {last_format = 4, path = 0x8191090}, list = {first = 0xb77b78b0, last = 0xb78818b0}} (gdb) p chan->spies->list $3 = {first = 0xb77b78b0, last = 0xb78818b0} (gdb) p &chan->spies->list $4 = (struct {...} *) 0x820e410 (gdb) p *(&chan->spies->list)->first $7 = {list = {next = 0x0}, lock = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 1, __m_lock = {__status = 0, __spinlock = 0}}, trigger = { __c_lock = {__status = 0, __spinlock = 0}, __c_waiting = 0x0, __padding = '\0' , __align = 0}, read_queue = {head = 0x820df80, samples = 160, format = 64}, write_queue = {head = 0x0, samples = 0, format = 64}, flags = 57, status = CHANSPY_RUNNING, type = 0xb791ff5e "ChanSpy", read_vol_adjustment = 0, write_vol_adjustment = 0} (gdb) p *(&chan->spies->list)->last $8 = {list = {next = 0xb78818b0}, lock = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 1, __m_lock = {__status = 0, __spinlock = 0}}, trigger = {__c_lock = {__status = 0, __spinlock = 0}, __c_waiting = 0x0, __padding = '\0' , __align = 0}, read_queue = {head = 0x0, samples = 0, format = 64}, write_queue = {head = 0x0, samples = 0, format = 64}, flags = 57, status = CHANSPY_RUNNING, type = 0xb791ff5e "ChanSpy", read_vol_adjustment = 0, write_vol_adjustment = 0}