[Asterisk-cvs] asterisk/channels chan_mgcp.c,1.119,1.120
markster at lists.digium.com
markster at lists.digium.com
Sun May 8 12:38:02 CDT 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv23957/channels
Modified Files:
chan_mgcp.c
Log Message:
Fix gethostname calls (bug #4198, with mods)
Index: chan_mgcp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_mgcp.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- chan_mgcp.c 4 May 2005 19:17:09 -0000 1.119
+++ chan_mgcp.c 8 May 2005 16:44:25 -0000 1.120
@@ -248,7 +248,7 @@
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 @@
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;
}
More information about the svn-commits
mailing list