! * Get value of msg field from dpi_tag * \Return * message on success, NULL on failure */
| 845 | * message on success, NULL on failure |
| 846 | */ |
| 847 | char *get_message(int sock_fd, char *dpi_tag) |
| 848 | { |
| 849 | char *msg, *d_cmd; |
| 850 | |
| 851 | msg = a_Dpip_get_attr(dpi_tag, "msg"); |
| 852 | if (msg == NULL) { |
| 853 | ERRMSG("get_message", "failed to parse msg", 0); |
| 854 | d_cmd = a_Dpip_build_cmd("cmd=%s msg=%s", |
| 855 | "DpiError", "Failed to parse request"); |
| 856 | (void) CKD_WRITE(sock_fd, d_cmd); |
| 857 | dFree(d_cmd); |
| 858 | } |
| 859 | return (msg); |
| 860 | } |
| 861 | |
| 862 | /* |
| 863 | * Compare a struct service pointer and a service name |
no test coverage detected