#define CEPH_CB_CONTINUE 1
#define CEPH_CB_ABORT 0
+#if HAVE_YAJL_V2
+typedef size_t yajl_len_t;
+#else
+typedef unsigned int yajl_len_t;
+#endif
+
/******* ceph_daemon *******/
struct ceph_daemon
{
return CEPH_CB_CONTINUE;
}
-static int ceph_cb_number(void *ctx, const char *number_val, size_t number_len)
+static int
+ceph_cb_number(void *ctx, const char *number_val, yajl_len_t number_len)
{
yajl_struct *yajl = (yajl_struct*)ctx;
char buffer[number_len+1];
return CEPH_CB_CONTINUE;
}
-static int
-ceph_cb_string(void *ctx, const unsigned char *string_val, size_t string_len)
+static int ceph_cb_string(void *ctx, const unsigned char *string_val,
+ yajl_len_t string_len)
{
return CEPH_CB_CONTINUE;
}
}
static int
-ceph_cb_map_key(void *ctx, const unsigned char *key, size_t string_len)
+ceph_cb_map_key(void *ctx, const unsigned char *key, yajl_len_t string_len)
{
yajl_struct *yajl = (yajl_struct*)ctx;
ret = cc_handle_bool(child, &long_run_latency_avg);
if(ret)
{
- ERROR("GOT %d handling bool", ret);
return ret;
}
}
- else if(strcasecmp("ConvertSpecialMetrics", child->key) == 0)
+ else if(strcasecmp("ConvertSpecialMetricTypes", child->key) == 0)
{
ret = cc_handle_bool(child, &convert_special_metrics);
if(ret)
{
- ERROR("GOT %d handling bool", ret);
return ret;
}
}
yajl_handle hand;
yajl_status status;
- hand = yajl_alloc(&callbacks, NULL, (void *) (&io->yajl));
+ hand = yajl_alloc(&callbacks,
+#if HAVE_YAJL_V2
+ /* alloc funcs = */ NULL,
+#else
+ /* alloc funcs = */ NULL, NULL,
+#endif
+ /* context = */ (void *)(&io->yajl));
if(!hand)
{