diff options
author | Sean Bright <sean@malleable.com> | 2008-11-07 16:18:52 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-11-07 16:18:52 +0000 |
commit | 1d09d193e748f1562c743cfd87bcb0fc2ba602ce (patch) | |
tree | 373564fd7c81d52467fe731f1f91e20221350142 /include/asterisk/indications.h | |
parent | 90e573c3734af5f5bbaf530fdd6e789700f55b8c (diff) |
Convert open-coded linked list in indications to the AST_LIST_* macros. This
cleans the code up some and should make it more maintainable as time goes on.
Reviewed by Russell, Kevin, Mark M., and Tilghman via ReviewBoard:
http://reviewboard.digium.com/r/34/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/indications.h')
-rw-r--r-- | include/asterisk/indications.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asterisk/indications.h b/include/asterisk/indications.h index 2841a9fdf..be65b9ba9 100644 --- a/include/asterisk/indications.h +++ b/include/asterisk/indications.h @@ -40,9 +40,9 @@ first tone description not preceeded by !. Duration is specified in milliseconds */ struct ind_tone_zone_sound { - struct ind_tone_zone_sound *next; /*!< next element */ const char *name; /*!< Identifing name */ const char *data; /*!< Actual zone description */ + AST_LIST_ENTRY(ind_tone_zone_sound) list; }; struct ind_tone_zone { @@ -52,7 +52,7 @@ struct ind_tone_zone { char description[40]; /*!< Description */ int nrringcadence; /*!< # registered ringcadence elements */ int *ringcadence; /*!< Ring cadence */ - struct ind_tone_zone_sound *tones; /*!< The known tones for this zone */ + AST_LIST_HEAD_NOLOCK(, ind_tone_zone_sound) tones; /*!< The known tones for this zone */ }; /*! \brief set the default tone country */ @@ -62,6 +62,8 @@ int ast_set_indication_country(const char *country); struct ind_tone_zone *ast_get_indication_zone(const char *country); /*! \brief locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */ struct ind_tone_zone_sound *ast_get_indication_tone(const struct ind_tone_zone *zone, const char *indication); +/*! \brief deallocate the passed tone zone */ +void ast_destroy_indication_zone(struct ind_tone_zone *zone); /*! \brief add a new country, if country exists, it will be replaced. */ int ast_register_indication_country(struct ind_tone_zone *country); |