* @param[in,out] ctx to allocate any buffers in.
* @param[out] out Where to write the cast type.
* @param[in] reply to process.
- * @param[in] dst_type to convert to. May be FR_TYPE_NULL
+ * @param[in] dst_type to convert to. May be FR_TYPE_VOID
* to infer type.
* @param[in] dst_enumv Used to convert string types to
* integers for attribute with enumerated
#if HIREDIS_MAJOR >= 1
case REDIS_REPLY_DOUBLE:
+ /* reply->str is \0 terminated in this case */
fr_value_box_shallow(&in, strtod(reply->str, NULL), true);
break;
#if HIREDIS_MAJOR >= 1
case REDIS_REPLY_BIGNUM: /* FIXME - Could try and conver to integer ? */
#endif
-
-
case REDIS_REPLY_STRING:
case REDIS_REPLY_STATUS:
if (shallow) {
fr_dlist_insert_tail(&out->vb_group, vb);
if (fr_redis_reply_to_value_box(vb, vb, reply->element[i],
- FR_TYPE_NULL, NULL, box_error, shallow) < 0) goto array_error;
+ FR_TYPE_VOID, NULL, box_error, shallow) < 0) goto array_error;
}
}
}
- if ((dst_type != FR_TYPE_NULL) && (fr_value_box_cast(ctx, out, dst_type, dst_enumv, &in) < 0)) return -1;
+ if ((dst_type != FR_TYPE_VOID) && (fr_value_box_cast(ctx, out, dst_type, dst_enumv, &in) < 0)) return -1;
return 0;
}
reply_parse:
MEM(vb_out = fr_value_box_alloc_null(ctx));
- if (fr_redis_reply_to_value_box(ctx, vb_out, reply, FR_TYPE_NULL, NULL, false, false) < 0) {
+ if (fr_redis_reply_to_value_box(ctx, vb_out, reply, FR_TYPE_VOID, NULL, false, false) < 0) {
RPERROR("Failed processing reply");
return XLAT_ACTION_FAIL;
}