MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / attrd_ipc_dispatch

Function attrd_ipc_dispatch

tools/attrd.c:139–170  ·  view source on GitHub ↗

Exit code means? */

Source from the content-addressed store, hash-verified

137
138/* Exit code means? */
139static int32_t
140attrd_ipc_dispatch(qb_ipcs_connection_t *c, void *data, size_t size)
141{
142 uint32_t id = 0;
143 uint32_t flags = 0;
144#if ENABLE_ACL
145 attrd_client_t *client = qb_ipcs_context_get(c);
146#endif
147 xmlNode *msg = crm_ipcs_recv(c, data, size, &id, &flags);
148
149 if(flags & crm_ipc_client_response) {
150 crm_trace("Ack'ing msg from %d (%p)", crm_ipcs_client_pid(c), c);
151 crm_ipcs_send_ack(c, id, "ack", __FUNCTION__, __LINE__);
152 }
153
154 if (msg == NULL) {
155 crm_debug("No msg from %d (%p)", crm_ipcs_client_pid(c), c);
156 return 0;
157 }
158
159#if ENABLE_ACL
160 determine_request_user(client->user, msg, F_ATTRD_USER);
161#endif
162
163 crm_trace("Processing msg from %d (%p)", crm_ipcs_client_pid(c), c);
164 crm_log_xml_trace(msg, __PRETTY_FUNCTION__);
165
166 attrd_local_callback(msg);
167
168 free_xml(msg);
169 return 0;
170}
171
172/* Error code means? */
173static int32_t

Callers

nothing calls this directly

Calls 6

crm_ipcs_recvFunction · 0.85
crm_ipcs_client_pidFunction · 0.85
crm_ipcs_send_ackFunction · 0.85
determine_request_userFunction · 0.85
attrd_local_callbackFunction · 0.85
free_xmlFunction · 0.85

Tested by

no test coverage detected