aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 16:18:52 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 16:18:52 +0000
commit8e17ba0b0b8f430db317149e54a1d92532a14572 (patch)
tree373564fd7c81d52467fe731f1f91e20221350142 /include
parentbbbe35acc74b1c43b63d5e34dd35803f10d047e3 (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: http://svn.digium.com/svn/asterisk/trunk@155284 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/indications.h6
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);