MCPcopy Create free account
hub / github.com/apache/httpd / md_json_writef

Function md_json_writef

modules/md/md_json.c:1015–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015apr_status_t md_json_writef(const md_json_t *json, apr_pool_t *p, md_json_fmt_t fmt, apr_file_t *f)
1016{
1017 apr_status_t rv;
1018 const char *s;
1019
1020 if ((s = md_json_writep(json, p, fmt))) {
1021 rv = apr_file_write_full(f, s, strlen(s), NULL);
1022 if (APR_SUCCESS != rv) {
1023 md_log_perror(MD_LOG_MARK, MD_LOG_ERR, rv, json->p, "md_json_writef: error writing file");
1024 }
1025 }
1026 else {
1027 rv = APR_EINVAL;
1028 md_log_perror(MD_LOG_MARK, MD_LOG_ERR, rv, json->p,
1029 "md_json_writef: error dumping json (%s)", md_json_dump_state(json, p));
1030 }
1031 return rv;
1032}
1033
1034apr_status_t md_json_fcreatex(const md_json_t *json, apr_pool_t *p, md_json_fmt_t fmt,
1035 const char *fpath, apr_fileperms_t perms)

Callers 2

md_json_fcreatexFunction · 0.85
write_jsonFunction · 0.85

Calls 3

md_json_writepFunction · 0.85
md_log_perrorFunction · 0.85
md_json_dump_stateFunction · 0.85

Tested by

no test coverage detected