Clean up resources in features on exit
authorMatthew Jordan <mjordan@digium.com>
Fri, 26 Apr 2013 21:27:24 +0000 (21:27 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 26 Apr 2013 21:27:24 +0000 (21:27 +0000)
commitb3e3dfa51ca8e632d17cff81a59810eb5fdad6f2
tree1361c8be1caed6bdbfef0dc04747c42987c4aa8d
parent79b2edea8f03c2c1e63f3472c128645d90c95363
Clean up resources in features on exit

This patch cleans up two things features:
* It properly unregisters the CLI commands that features registered
* It cancels and performs a pthread_join on the created parking thread. This
  not only properly joins a non-detached thread, but also prevents disposing
  of the parking lots prior to the parking thread completely exiting.

(closes issue ASTERISK-21407)
Reported by: Corey Farrell
patches:
  features_shutdown-r2.patch uploaded by Corey Farrell (License 5909)
........

Merged revisions 386641 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 386642 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/features.c