comparison src/proxy.c @ 9100:4b3e5a5063f9

[gaim-migrate @ 9877] For some reason Stu thinks that 'Error: Success' is undesirable. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Fri, 28 May 2004 00:47:45 +0000
parents 52fba1dafe0e
children 3e94a77ee0c7
comparison
equal deleted inserted replaced
9099:8da67bfea813 9100:4b3e5a5063f9
688 */ 688 */
689 ret = getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len); 689 ret = getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len);
690 if (ret == 0 && error == EINPROGRESS) 690 if (ret == 0 && error == EINPROGRESS)
691 return; // we'll be called again later 691 return; // we'll be called again later
692 if (ret < 0 || error != 0) { 692 if (ret < 0 || error != 0) {
693 if(ret==0) errno = error; 693 if(ret!=0) error = errno;
694 close(source); 694 close(source);
695 gaim_input_remove(phb->inpa); 695 gaim_input_remove(phb->inpa);
696 696
697 if (phb->account == NULL || 697 if (phb->account == NULL ||
698 gaim_account_get_connection(phb->account) != NULL) { 698 gaim_account_get_connection(phb->account) != NULL) {
702 702
703 g_free(phb->host); 703 g_free(phb->host);
704 g_free(phb); 704 g_free(phb);
705 705
706 gaim_debug(GAIM_DEBUG_ERROR, "proxy", 706 gaim_debug(GAIM_DEBUG_ERROR, "proxy",
707 "getsockopt SO_ERROR check: %s\n", strerror(errno)); 707 "getsockopt SO_ERROR check: %s\n", strerror(error));
708 return; 708 return;
709 } 709 }
710 710
711 fcntl(source, F_SETFL, 0); 711 fcntl(source, F_SETFL, 0);
712 gaim_input_remove(phb->inpa); 712 gaim_input_remove(phb->inpa);
759 "Connect would have blocked.\n"); 759 "Connect would have blocked.\n");
760 phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, no_one_calls, phb); 760 phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, no_one_calls, phb);
761 } 761 }
762 else { 762 else {
763 gaim_debug(GAIM_DEBUG_ERROR, "proxy", 763 gaim_debug(GAIM_DEBUG_ERROR, "proxy",
764 "Connect failed (errno %d)\n", errno); 764 "Connect failed: %s\n", strerror(errno));
765 close(fd); 765 close(fd);
766 return -1; 766 return -1;
767 } 767 }
768 } 768 }
769 else { 769 else {