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

Function md_result_from_json

modules/md/md_result.c:144–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144md_result_t*md_result_from_json(const struct md_json_t *json, apr_pool_t *p)
145{
146 md_result_t *result;
147 const char *s;
148
149 result = md_result_make(p, APR_SUCCESS);
150 result->status = (int)md_json_getl(json, MD_KEY_STATUS, NULL);
151 result->problem = md_json_dups(p, json, MD_KEY_PROBLEM, NULL);
152 result->detail = md_json_dups(p, json, MD_KEY_DETAIL, NULL);
153 result->activity = md_json_dups(p, json, MD_KEY_ACTIVITY, NULL);
154 s = md_json_dups(p, json, MD_KEY_VALID_FROM, NULL);
155 if (s && *s) result->ready_at = apr_date_parse_rfc(s);
156 result->subproblems = md_json_dupj(p, json, MD_KEY_SUBPROBLEMS, NULL);
157 return result;
158}
159
160struct md_json_t *md_result_to_json(const md_result_t *result, apr_pool_t *p)
161{

Callers 1

md_job_from_jsonFunction · 0.85

Calls 4

md_result_makeFunction · 0.85
md_json_getlFunction · 0.85
md_json_dupsFunction · 0.85
md_json_dupjFunction · 0.85

Tested by

no test coverage detected