make sure to set sin_family (bug #3188)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-01-03 02:38:26 +00:00
parent 10378ed083
commit da0fb57df3

View File

@@ -3748,6 +3748,8 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
}
return NULL;
}
gw->defaddr.sin_family = AF_INET;
gw->addr.sin_family = AF_INET;
if (gw->defaddr.sin_addr.s_addr && !ntohs(gw->defaddr.sin_port))
gw->defaddr.sin_port = htons(DEFAULT_MGCP_GW_PORT);
if (gw->addr.sin_addr.s_addr && !ntohs(gw->addr.sin_port))