diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-17 19:41:09 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-17 19:41:09 +0000 |
commit | 6c8c36cb1296babe111fc188cf94358137df932d (patch) | |
tree | 7ade37a73be592281a8769ca567fdb250bade101 /channels/chan_iax2.c | |
parent | eed311e230dd674f975879037e09db036496029b (diff) |
print out the IAX DATETIME IE in 'iax2 debug' in human readable form
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_iax2.c')
-rwxr-xr-x | channels/chan_iax2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index a76082aa2..66d18990a 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -2764,12 +2764,12 @@ static unsigned int iax2_datetime(char *tz) localtime_r(&t, &tm); if (!ast_strlen_zero(tz)) ast_localtime(&t, &tm, tz); - tmp = (tm.tm_sec >> 1) & 0x1f; /* 5 bits of seconds */ - tmp |= (tm.tm_min & 0x3f) << 5; /* 6 bits of minutes */ - tmp |= (tm.tm_hour & 0x1f) << 11; /* 5 bits of hours */ - tmp |= (tm.tm_mday & 0x1f) << 16; /* 5 bits of day of month */ - tmp |= ((tm.tm_mon + 1) & 0xf) << 21; /* 4 bits of month */ - tmp |= ((tm.tm_year - 100) & 0x7f) << 25; /* 7 bits of year */ + tmp = (tm.tm_sec >> 1) & 0x1f; /* 5 bits of seconds */ + tmp |= (tm.tm_min & 0x3f) << 5; /* 6 bits of minutes */ + tmp |= (tm.tm_hour & 0x1f) << 11; /* 5 bits of hours */ + tmp |= (tm.tm_mday & 0x1f) << 16; /* 5 bits of day of month */ + tmp |= ((tm.tm_mon + 1) & 0xf) << 21; /* 4 bits of month */ + tmp |= ((tm.tm_year - 100) & 0x7f) << 25; /* 7 bits of year */ return tmp; } |