diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-06 02:29:18 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-06 02:29:18 +0000 |
commit | 7b1b9f53ef47abd82c6faba12f4adcf721e622da (patch) | |
tree | be967c9ab3099202d13219196b5f17284a939e78 /apps/app_zapscan.c | |
parent | d39208dd35ce0ead92bf6a4b21361f3d13759589 (diff) |
more efficient (and understandable) ast_channel_walk_locked, and vastly more efficient ast_channel_by_name_locked (bug #4265)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5853 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_zapscan.c')
-rwxr-xr-x | apps/app_zapscan.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c index 195fc657c..9b153ed26 100755 --- a/apps/app_zapscan.c +++ b/apps/app_zapscan.c @@ -64,15 +64,7 @@ static struct ast_channel *get_zap_channel_locked(int num) { char name[80]; snprintf(name,sizeof(name),"Zap/%d-1",num); - c = ast_channel_walk_locked(NULL); - while(c) { - if (!strcasecmp(c->name, name)) { - break; - } - ast_mutex_unlock(&c->lock); - c = ast_channel_walk_locked(c); - } - return c; + return ast_get_channel_by_name_locked(name); } static int careful_write(int fd, unsigned char *data, int len) |