Mercurial > pidgin.yaz
comparison src/proxy.c @ 5225:0bf1ced10b2b
[gaim-migrate @ 5595]
no_one_calls now sets errno on getsockopt error
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sat, 26 Apr 2003 14:58:02 +0000 |
parents | 4ee151ad8233 |
children | 8d8bf0d31a23 |
comparison
equal
deleted
inserted
replaced
5224:5160333a80df | 5225:0bf1ced10b2b |
---|---|
621 | 621 |
622 len = sizeof(error); | 622 len = sizeof(error); |
623 | 623 |
624 ret = getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len); | 624 ret = getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len); |
625 if (ret < 0 || error != 0) { | 625 if (ret < 0 || error != 0) { |
626 if(ret==0) errno = error; | |
626 close(source); | 627 close(source); |
627 gaim_input_remove(phb->inpa); | 628 gaim_input_remove(phb->inpa); |
628 if(!phb->account || phb->account->gc) | 629 if(!phb->account || phb->account->gc) |
629 phb->func(phb->data, -1, GAIM_INPUT_READ); | 630 phb->func(phb->data, -1, GAIM_INPUT_READ); |
630 g_free(phb->host); | 631 g_free(phb->host); |
631 g_free(phb); | 632 g_free(phb); |
632 | 633 |
633 gaim_debug(GAIM_DEBUG_ERROR, "proxy", | 634 gaim_debug(GAIM_DEBUG_ERROR, "proxy", |
634 "getsockopt SO_ERROR check: %s\n", | 635 "getsockopt SO_ERROR check: %s\n", strerror(errno)); |
635 strerror((ret < 0) ? errno : error)); | |
636 return; | 636 return; |
637 } | 637 } |
638 fcntl(source, F_SETFL, 0); | 638 fcntl(source, F_SETFL, 0); |
639 gaim_input_remove(phb->inpa); | 639 gaim_input_remove(phb->inpa); |
640 if(!phb->account || phb->account->gc) | 640 if(!phb->account || phb->account->gc) |