- convert the lists of switches to use the linked list macros

- remove some checks of the result of ast_mutex_lock, since it is not necessary
   (this would be a good project to add to the janitor projects list).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-05-08 11:20:19 +00:00
parent 05ea5482d0
commit 0fd612930a
2 changed files with 74 additions and 147 deletions

View File

@@ -25,6 +25,7 @@
#include "asterisk/sched.h"
#include "asterisk/channel.h"
#include "asterisk/linkedlists.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -80,7 +81,7 @@ typedef int (ast_switch_f)(struct ast_channel *chan, const char *context,
/*!< Data structure associated with an Asterisk switch */
struct ast_switch {
struct ast_switch *next;
AST_LIST_ENTRY(ast_switch) list;
const char *name; /*!< Name of the switch */
const char *description; /*!< Description of the switch */