diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-08 21:27:47 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-08 21:27:47 +0000 |
commit | 4985725e6066e2d58eb752ceea5397cfe28bf9f5 (patch) | |
tree | ecb219473468c2acd8f7e3d1e4066469f8034748 /indications.c | |
parent | bc2bfb8f31d0a54ff5232e38baa9920c71007a86 (diff) |
remove checks of the result of ast_mutex_lock
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25716 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'indications.c')
-rw-r--r-- | indications.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/indications.c b/indications.c index 9b632de98..93cc6c25c 100644 --- a/indications.c +++ b/indications.c @@ -382,10 +382,7 @@ struct tone_zone *ast_get_indication_zone(const char *country) if (country == NULL) return 0; /* not a single country insight */ - if (ast_mutex_lock(&tzlock)) { - ast_log(LOG_WARNING, "Unable to lock tone_zones list\n"); - return 0; - } + ast_mutex_lock(&tzlock); do { for (tz=tone_zones; tz; tz=tz->next) { if (strcasecmp(country,tz->country)==0) { @@ -419,10 +416,7 @@ struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, co if (zone == NULL) return 0; /* not a single country insight */ - if (ast_mutex_lock(&tzlock)) { - ast_log(LOG_WARNING, "Unable to lock tone_zones list\n"); - return 0; - } + ast_mutex_lock(&tzlock); for (ts=zone->tones; ts; ts=ts->next) { if (strcasecmp(indication,ts->name)==0) { /* found indication! */ @@ -457,10 +451,7 @@ int ast_register_indication_country(struct tone_zone *zone) { struct tone_zone *tz,*pz; - if (ast_mutex_lock(&tzlock)) { - ast_log(LOG_WARNING, "Unable to lock tone_zones list\n"); - return -1; - } + ast_mutex_lock(&tzlock); for (pz=NULL,tz=tone_zones; tz; pz=tz,tz=tz->next) { if (strcasecmp(zone->country,tz->country)==0) { /* tone_zone already there, replace */ @@ -498,10 +489,7 @@ int ast_unregister_indication_country(const char *country) struct tone_zone *tz, *pz = NULL, *tmp; int res = -1; - if (ast_mutex_lock(&tzlock)) { - ast_log(LOG_WARNING, "Unable to lock tone_zones list\n"); - return -1; - } + ast_mutex_lock(&tzlock); tz = tone_zones; while (tz) { if (country==NULL || @@ -546,10 +534,7 @@ int ast_register_indication(struct tone_zone *zone, const char *indication, cons if (zone->alias[0]) return -1; - if (ast_mutex_lock(&tzlock)) { - ast_log(LOG_WARNING, "Unable to lock tone_zones list\n"); - return -2; - } + ast_mutex_lock(&tzlock); for (ps=NULL,ts=zone->tones; ts; ps=ts,ts=ts->next) { if (strcasecmp(indication,ts->name)==0) { /* indication already there, replace */ @@ -588,10 +573,7 @@ int ast_unregister_indication(struct tone_zone *zone, const char *indication) if (zone->alias[0]) return -1; - if (ast_mutex_lock(&tzlock)) { - ast_log(LOG_WARNING, "Unable to lock tone_zones list\n"); - return -1; - } + ast_mutex_lock(&tzlock); ts = zone->tones; while (ts) { if (strcasecmp(indication,ts->name)==0) { |