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

Function md_json_readb

modules/md/md_json.c:1124–1138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122}
1123
1124apr_status_t md_json_readb(md_json_t **pjson, apr_pool_t *pool, apr_bucket_brigade *bb)
1125{
1126 json_error_t error;
1127 json_t *j;
1128
1129 j = json_load_callback(load_cb, bb, 0, &error);
1130 if (j) {
1131 *pjson = json_create(pool, j);
1132 } else {
1133 md_log_perror(MD_LOG_MARK, MD_LOG_ERR, 0, pool,
1134 "failed to load JSON file: %s (line %d:%d)",
1135 error.text, error.line, error.column);
1136 }
1137 return (j && *pjson) ? APR_SUCCESS : APR_EINVAL;
1138}
1139
1140static size_t load_file_cb(void *data, size_t max_len, void *baton)
1141{

Callers 1

md_json_read_httpFunction · 0.85

Calls 2

json_createFunction · 0.85
md_log_perrorFunction · 0.85

Tested by

no test coverage detected