Fix connecting to addresses besides IPv4
This commit is contained in:
parent
6852e70275
commit
68b2a8b08c
|
@ -1206,7 +1206,8 @@ static gboolean _on_connect(gpointer data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* create the socket */
|
/* create the socket */
|
||||||
if((imap4->fd = socket(ai->ai_family, ai->ai_socktype, 0)) == -1)
|
if((imap4->fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol))
|
||||||
|
== -1)
|
||||||
{
|
{
|
||||||
helper->error(helper->account, strerror(errno), 1);
|
helper->error(helper->account, strerror(errno), 1);
|
||||||
_imap4_stop(imap4);
|
_imap4_stop(imap4);
|
||||||
|
|
|
@ -666,7 +666,8 @@ static gboolean _on_connect(gpointer data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* create the socket */
|
/* create the socket */
|
||||||
if((pop3->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
|
if((pop3->fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol))
|
||||||
|
== -1)
|
||||||
{
|
{
|
||||||
helper->error(helper->account, strerror(errno), 1);
|
helper->error(helper->account, strerror(errno), 1);
|
||||||
_pop3_stop(pop3);
|
_pop3_stop(pop3);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user