mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Minor code cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -395,21 +395,20 @@ int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset)
|
|||||||
{
|
{
|
||||||
time_t whentohangup;
|
time_t whentohangup;
|
||||||
|
|
||||||
if (chan->whentohangup == 0) {
|
if (!chan->whentohangup)
|
||||||
return (offset == 0) ? 0 : -1;
|
return (offset == 0) ? 0 : -1;
|
||||||
} else {
|
|
||||||
if (offset == 0) /* XXX why is this special ? */
|
if (!offset) /* XXX why is this special? */
|
||||||
return (1);
|
return 1;
|
||||||
else {
|
|
||||||
whentohangup = offset + time (NULL);
|
whentohangup = offset + time(NULL);
|
||||||
if (chan->whentohangup < whentohangup)
|
|
||||||
return (1);
|
if (chan->whentohangup < whentohangup)
|
||||||
else if (chan->whentohangup == whentohangup)
|
return 1;
|
||||||
return (0);
|
else if (chan->whentohangup == whentohangup)
|
||||||
else
|
return 0;
|
||||||
return (-1);
|
else
|
||||||
}
|
return -1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Register a new telephony channel in Asterisk */
|
/*! \brief Register a new telephony channel in Asterisk */
|
||||||
|
Reference in New Issue
Block a user