mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-18 17:27:11 +00:00
increase max subscription ID length, needed for hamstr client
This commit is contained in:
@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
|
|
||||||
struct SubId {
|
struct SubId {
|
||||||
char buf[64];
|
char buf[72];
|
||||||
|
|
||||||
SubId(std::string_view val) {
|
SubId(std::string_view val) {
|
||||||
static_assert(MAX_SUBID_SIZE == 63, "MAX_SUBID_SIZE mismatch");
|
static_assert(MAX_SUBID_SIZE == 71, "MAX_SUBID_SIZE mismatch");
|
||||||
if (val.size() > 63) throw herr("subscription id too long");
|
if (val.size() > 71) throw herr("subscription id too long");
|
||||||
if (val.size() == 0) throw herr("subscription id too short");
|
if (val.size() == 0) throw herr("subscription id too short");
|
||||||
|
|
||||||
auto badChar = [](char c){
|
auto badChar = [](char c){
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
const size_t MAX_SUBID_SIZE = 63; // Statically allocated size in SubId
|
const size_t MAX_SUBID_SIZE = 71; // Statically allocated size in SubId
|
||||||
const uint64_t MAX_TIMESTAMP = 17179869184; // Safety limit to ensure it can fit in quadrable key. Good until year 2514.
|
const uint64_t MAX_TIMESTAMP = 17179869184; // Safety limit to ensure it can fit in quadrable key. Good until year 2514.
|
||||||
|
Reference in New Issue
Block a user