diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-08 16:44:25 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-08 16:44:25 +0000 |
commit | 64ef317fa800d98746ef903c8497e4bcb983b44e (patch) | |
tree | 43cbdcb172a60d2c629ea2fd39d2314ccdc1db2e /channels/chan_mgcp.c | |
parent | 5ca62a6c1367dbb9fc7da9acf5cf509684ee98bc (diff) |
Fix gethostname calls (bug #4198, with mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5600 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_mgcp.c')
-rwxr-xr-x | channels/chan_mgcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index e1e8afcf2..5d4621f55 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -248,7 +248,7 @@ static int restart_monitor(void); static int capability = AST_FORMAT_ULAW; static int nonCodecCapability = AST_RTP_DTMF; -static char ourhost[256]; +static char ourhost[MAXHOSTNAMELEN]; static struct in_addr __ourip; static int ourport; @@ -4096,7 +4096,7 @@ static int reload_config(void) struct hostent *hp; int format; - if (gethostname(ourhost, sizeof(ourhost))) { + if (gethostname(ourhost, sizeof(ourhost)-1)) { ast_log(LOG_WARNING, "Unable to get hostname, MGCP disabled\n"); return 0; } |