mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Fix a bug in peer handling that caused multiple instances of a peer to end up
in the peers container after a reload. Somehow, this bug doesn't exist in 1.4 ... (closes issue #11626) (reported by pnlarsson, additional info from mvanbaak, fixed by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6454,7 +6454,7 @@ static void unlink_peer(struct iax2_peer *peer)
|
||||
}
|
||||
}
|
||||
|
||||
unlink_peer(peer);
|
||||
ao2_unlink(peers, peer);
|
||||
}
|
||||
|
||||
static void __expire_registry(const void *data)
|
||||
@@ -9872,6 +9872,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
|
||||
oldha = peer->ha;
|
||||
peer->ha = NULL;
|
||||
}
|
||||
unlink_peer(peer);
|
||||
} else if ((peer = ao2_alloc(sizeof(*peer), peer_destructor))) {
|
||||
peer->expire = -1;
|
||||
peer->pokeexpire = -1;
|
||||
|
Reference in New Issue
Block a user