equal
deleted
inserted
replaced
516 |
516 |
517 socket = lm_old_socket_ref (connect_data->socket); |
517 socket = lm_old_socket_ref (connect_data->socket); |
518 /* addr = connect_data->current_addr; */ |
518 /* addr = connect_data->current_addr; */ |
519 fd = g_io_channel_unix_get_fd (source); |
519 fd = g_io_channel_unix_get_fd (source); |
520 |
520 |
521 if (condition & G_IO_ERR) { |
521 if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) { |
522 len = sizeof (err); |
522 len = sizeof (err); |
523 _lm_sock_get_error (fd, &err, &len); |
523 _lm_sock_get_error (fd, &err, &len); |
524 if (!_lm_sock_is_blocking_error (err)) { |
524 if (!_lm_sock_is_blocking_error (err)) { |
525 g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_VERBOSE, |
525 g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_VERBOSE, |
526 "Connection failed.\n"); |
526 "Connection failed.\n"); |
662 |
662 |
663 if (socket->proxy) { |
663 if (socket->proxy) { |
664 socket->watch_connect = |
664 socket->watch_connect = |
665 lm_misc_add_io_watch (socket->context, |
665 lm_misc_add_io_watch (socket->context, |
666 connect_data->io_channel, |
666 connect_data->io_channel, |
667 G_IO_OUT|G_IO_ERR, |
667 G_IO_OUT | G_IO_ERR | G_IO_HUP | G_IO_NVAL, |
668 (GIOFunc) _lm_proxy_connect_cb, |
668 (GIOFunc) _lm_proxy_connect_cb, |
669 connect_data); |
669 connect_data); |
670 } else { |
670 } else { |
671 socket->watch_connect = |
671 socket->watch_connect = |
672 lm_misc_add_io_watch (socket->context, |
672 lm_misc_add_io_watch (socket->context, |
673 connect_data->io_channel, |
673 connect_data->io_channel, |
674 G_IO_OUT|G_IO_ERR, |
674 G_IO_OUT | G_IO_ERR | G_IO_HUP | G_IO_NVAL, |
675 (GIOFunc) socket_connect_cb, |
675 (GIOFunc) socket_connect_cb, |
676 connect_data); |
676 connect_data); |
677 } |
677 } |
678 |
678 |
679 res = _lm_sock_connect (connect_data->fd, |
679 res = _lm_sock_connect (connect_data->fd, |