aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_timeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_timeout.c')
-rw-r--r--funcs/func_timeout.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c
index b88ae078f..7d9d535ea 100644
--- a/funcs/func_timeout.c
+++ b/funcs/func_timeout.c
@@ -45,6 +45,9 @@ static int timeout_read(struct ast_channel *chan, char *cmd, char *data,
{
time_t myt;
+ if (!chan)
+ return -1;
+
if (!data) {
ast_log(LOG_ERROR, "Must specify type of timeout to get.\n");
return -1;
@@ -90,6 +93,9 @@ static int timeout_write(struct ast_channel *chan, char *cmd, char *data,
char timestr[64];
struct tm myt;
+ if (!chan)
+ return -1;
+
if (!data) {
ast_log(LOG_ERROR, "Must specify type of timeout to set.\n");
return -1;