diff options
Diffstat (limited to 'apps/app_setcdruserfield.c')
-rwxr-xr-x | apps/app_setcdruserfield.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/app_setcdruserfield.c b/apps/app_setcdruserfield.c index 4684fdd8b..7e820db12 100755 --- a/apps/app_setcdruserfield.c +++ b/apps/app_setcdruserfield.c @@ -76,13 +76,7 @@ static int action_setcdruserfield(struct mansession *s, struct message *m) astman_send_error(s, m, "No UserField specified"); return 0; } - c = ast_channel_walk_locked(NULL); - while (c) { - if (!strcasecmp(c->name, channel)) - break; - ast_mutex_unlock(&c->lock); - c = ast_channel_walk_locked(c); - } + c = ast_get_channel_by_name_locked(channel); if (!c) { astman_send_error(s, m, "No such channel"); return 0; |