diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-26 17:43:17 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-26 17:43:17 +0000 |
commit | 19b0c704b15e24e08e8054071e043f5ff7cd843a (patch) | |
tree | 811331b4f69856ef7c2076297c54d961bfcd5bc2 /res | |
parent | 98aa2809e24755d37575898cbc0d9d70ccf53a58 (diff) |
Only unlock these if they were locked on entry
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38250 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index 87f2c4dc4..8340a6a59 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -200,7 +200,7 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec, ast_log(LOG_WARNING, "Could not create file %s\n", monitor->read_filename); free(monitor); - ast_channel_unlock(chan); + UNLOCK_IF_NEEDED(chan, need_lock); return -1; } if (ast_fileexists(monitor->write_filename, NULL, NULL) > 0) { @@ -213,7 +213,7 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec, monitor->write_filename); ast_closestream(monitor->read_stream); free(monitor); - ast_channel_unlock(chan); + UNLOCK_IF_NEEDED(chan, need_lock); return -1; } chan->monitor = monitor; |