Bug 628904 – Add credential support for FreeBSD and fix a socket issue

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
Joe Marcus Clarke
2010-09-09 14:10:01 -04:00
committed by David Zeuthen
parent ee945d8f62
commit 964eb62343
4 changed files with 109 additions and 3 deletions

View File

@@ -2928,8 +2928,13 @@ g_socket_send_message (GSocket *socket,
for (i = 0; i < num_messages; i++)
msg.msg_controllen += CMSG_SPACE (g_socket_control_message_get_size (messages[i]));
msg.msg_control = g_alloca (msg.msg_controllen);
memset (msg.msg_control, '\0', msg.msg_controllen);
if (msg.msg_controllen == 0)
msg.msg_control = NULL;
else
{
msg.msg_control = g_alloca (msg.msg_controllen);
memset (msg.msg_control, '\0', msg.msg_controllen);
}
cmsg = CMSG_FIRSTHDR (&msg);
for (i = 0; i < num_messages; i++)