mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 10:56:37 +00:00
[snmp-smux] Fix problems if 'smux peer ...' is issued multiple times
2007-10-22 Lorenzo Colitti <lorenzo@colitti.com> * smux.c: (smux_stop) Avoid cancelling a defunct thread pointer (smux_start) Stop smux before trying to start it, possibly again.
This commit is contained in:
parent
9c1deac7d6
commit
a56ef88348
@ -1,3 +1,8 @@
|
|||||||
|
2007-10-22 Lorenzo Colitti <lorenzo@colitti.com>
|
||||||
|
|
||||||
|
* smux.c: (smux_stop) Avoid cancelling a defunct thread pointer
|
||||||
|
(smux_start) Stop smux before trying to start it, possibly again.
|
||||||
|
|
||||||
2007-10-04 Denis Ovsienko
|
2007-10-04 Denis Ovsienko
|
||||||
|
|
||||||
* pid_output.c: (pid_output) stop using LOGFILE_MASK
|
* pid_output.c: (pid_output) stop using LOGFILE_MASK
|
||||||
|
14
lib/smux.c
14
lib/smux.c
@ -1228,9 +1228,16 @@ void
|
|||||||
smux_stop ()
|
smux_stop ()
|
||||||
{
|
{
|
||||||
if (smux_read_thread)
|
if (smux_read_thread)
|
||||||
thread_cancel (smux_read_thread);
|
{
|
||||||
|
thread_cancel (smux_read_thread);
|
||||||
|
smux_read_thread = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (smux_connect_thread)
|
if (smux_connect_thread)
|
||||||
thread_cancel (smux_connect_thread);
|
{
|
||||||
|
thread_cancel (smux_connect_thread);
|
||||||
|
smux_connect_thread = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (smux_sock >= 0)
|
if (smux_sock >= 0)
|
||||||
{
|
{
|
||||||
@ -1534,6 +1541,9 @@ smux_init (struct thread_master *tm)
|
|||||||
void
|
void
|
||||||
smux_start(void)
|
smux_start(void)
|
||||||
{
|
{
|
||||||
|
/* Close any existing connections. */
|
||||||
|
smux_stop();
|
||||||
|
|
||||||
/* Schedule first connection. */
|
/* Schedule first connection. */
|
||||||
smux_event (SMUX_SCHEDULE, 0);
|
smux_event (SMUX_SCHEDULE, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user