Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
pacemaker.13547
pacemaker-libcrmcommon-meaningful-error-codes-t...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libcrmcommon-meaningful-error-codes-to-connection-callbacks.patch of Package pacemaker.13547
commit 30aaeaed17f460917825ad4000513f1a778a972f Author: Ken Gaillot <kgaillot@redhat.com> Date: Wed Oct 25 16:53:36 2017 -0500 Low: libcrmcommon: return meaningful error codes to connection callbacks Previously, on error, check_connect_finished() sometimes set rc to -errno and sometimes to -1. Now, it always uses -errno. diff --git a/lib/common/remote.c b/lib/common/remote.c index d19ddbbe8..3f423e5cb 100644 --- a/lib/common/remote.c +++ b/lib/common/remote.c @@ -723,19 +723,18 @@ check_connect_finished(gpointer userdata) /* can we read or write to the socket now? */ if (FD_ISSET(sock, &rset) || FD_ISSET(sock, &wset)) { if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { + rc = -errno; crm_trace("fd %d: call to getsockopt failed", sock); - rc = -1; goto dispatch_done; } - if (error) { crm_trace("fd %d: error returned from getsockopt: %d", sock, error); - rc = -1; + rc = -error; goto dispatch_done; } } else { crm_trace("neither read nor write set after select"); - rc = -1; + rc = -EAGAIN; goto dispatch_done; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor