diff options
Diffstat (limited to 'database')
-rw-r--r-- | database/contexts/rrdcontext.h | 5 | ||||
-rw-r--r-- | database/rrdlabels.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/database/contexts/rrdcontext.h b/database/contexts/rrdcontext.h index 0261c78227..152422aa79 100644 --- a/database/contexts/rrdcontext.h +++ b/database/contexts/rrdcontext.h @@ -258,6 +258,8 @@ typedef struct query_metric { #define MAX_QUERY_TARGET_ID_LENGTH 255 +typedef bool (*interrupt_callback_t)(void *data); + typedef struct query_target_request { size_t version; @@ -303,6 +305,9 @@ typedef struct query_target_request { RRDR_GROUP_BY_FUNCTION group_by_aggregate_function; usec_t received_ut; + + interrupt_callback_t interrupt_callback; + void *interrupt_callback_data; } QUERY_TARGET_REQUEST; #define GROUP_BY_MAX_LABEL_KEYS 10 diff --git a/database/rrdlabels.c b/database/rrdlabels.c index 3b728db95a..f6abd60232 100644 --- a/database/rrdlabels.c +++ b/database/rrdlabels.c @@ -399,7 +399,7 @@ size_t text_sanitize(unsigned char *dst, const unsigned char *src, size_t dst_si // find how big this character is (2-4 bytes) size_t utf_character_size = 2; - while(utf_character_size <= 4 && src[utf_character_size] && IS_UTF8_BYTE(src[utf_character_size]) && !IS_UTF8_STARTBYTE(src[utf_character_size])) + while(utf_character_size < 4 && src[utf_character_size] && IS_UTF8_BYTE(src[utf_character_size]) && !IS_UTF8_STARTBYTE(src[utf_character_size])) utf_character_size++; if(utf) { |