MCPcopy Create free account
hub / github.com/corosync/corosync / sam_parent_reply_send

Function sam_parent_reply_send

lib/sam.c:846–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

844}
845
846static cs_error_t sam_parent_reply_send (
847 cs_error_t err,
848 int parent_fd_in,
849 int parent_fd_out)
850{
851 char reply;
852
853 if (err == CS_OK) {
854 reply = SAM_REPLY_OK;
855
856 if (sam_safe_write (parent_fd_out, &reply, sizeof (reply)) != sizeof (reply)) {
857 err = CS_ERR_LIBRARY;
858 goto error_reply;
859 }
860
861 return (CS_OK);
862 }
863
864error_reply:
865 reply = SAM_REPLY_ERROR;
866 if (sam_safe_write (parent_fd_out, &reply, sizeof (reply)) != sizeof (reply)) {
867 return (CS_ERR_LIBRARY);
868 }
869 if (sam_safe_write (parent_fd_out, &err, sizeof (err)) != sizeof (err)) {
870 return (CS_ERR_LIBRARY);
871 }
872
873 return (err);
874}
875
876
877static cs_error_t sam_parent_warn_signal_set (

Callers 4

sam_parent_data_storeFunction · 0.85

Calls 1

sam_safe_writeFunction · 0.85

Tested by

no test coverage detected