{ NULL , -1 }
};
+#ifdef HAVE_JSON
/** Flags to control the conversion of JSON values to VALUE_PAIRs.
*
* These fields are set when parsing the expanded format for value pairs in
* @see json_pairmake
* @see json_pairmake_leaf
*/
-#ifdef HAVE_JSON
typedef struct json_flags {
boolean do_xlat; //!< If TRUE value will be expanded with xlat.
boolean is_json; //!< If TRUE value will be inserted as raw JSON
* successive calls will return additional encoded VALUE_PAIRs.
*
* Only complete attribute headers
- * @verbatim "<name>":{"type":"<type>","value":['</pre> @endverbatim
+ * @verbatim "<name>":{"type":"<type>","value":[' @endverbatim
* and complete attribute values will be written to ptr.
*
* If an attribute occurs multiple times in the request the attribute values
* @param[in] object containing root node, or parent node.
* @param[in] level Current nesting level.
* @param[in] max_attrs counter, decremented after each VALUE_PAIR is created,
- * when 0 no more attributes will be processed.
+ * when 0 no more attributes will be processed.
* @return VALUE_PAIR or NULL on error.
*/
static VALUE_PAIR *json_pairmake(rlm_rest_t *instance,
*
* Converts the raw JSON string into a json-c object tree and passes it to
* json_pairmake. After the tree has been parsed json_object_put is called
- * which decrements the reference, count to the root node by one, and frees
+ * which decrements the reference count of the root node by one, and frees
* the entire tree.
*
* @see rest_encode_json
* Empty response?
*/
while (isspace(*p)) p++;
- if (p == NULL) return FALSE;
+ if (p == '\0') return FALSE;
json = json_tokener_parse(p);
if (!json) {
* @see rest_write_header
*
* @param[in] request Current request.
- * @param[in] data to initialise.
+ * @param[in] ctx data to initialise.
* @param[in] type Default http_body_type to use when decoding raw data, may be
* overwritten by rest_write_header.
*/
* @param[in] section configuration data.
* @param[in] handle rlm_rest_handle_t to configure.
* @param[in] func to pass to libcurl for chunked.
- * transfers (NULL if not using chunked mode).
+ * transfers (NULL if not using chunked mode).
* @return TRUE on success FALSE on error.
*/
static int rest_request_config_body(rlm_rest_t *instance,
*
* Encode special chars as per RFC 3986 section 4.
*
+ * @param[in] request Current request.
* @param[out] out Where to write escaped string.
* @param[in] outlen Size of out buffer.
* @param[in] raw string to be urlencoded.
/*
* All URLs must contain at least <scheme>://<server>/
*/
- while (q = strchr(p, '/')) {
+ while ((q = strchr(p, '/'))) {
p = q + 1;
if (++count == 3) {