bugfix: TSG-14162 使用strlen(meta->route_ctx)判断route_ctx是否为空时,遗漏route_ctx首字节为0的情况

This commit is contained in:
luwenpeng
2023-03-13 19:39:57 +08:00
parent 20510bd2d5
commit 8d820e3213
4 changed files with 55 additions and 12 deletions

View File

@@ -53,6 +53,19 @@ struct sids
void sids_write_once(struct sids *dst, struct sids *src);
void sids_copy(struct sids *dst, struct sids *src);
/******************************************************************************
* route_ctx
******************************************************************************/
struct route_ctx
{
char data[64];
int len;
};
int route_ctx_is_empty(struct route_ctx *ctx);
void route_ctx_copy(struct route_ctx *dst, struct route_ctx *src);
/******************************************************************************
* throughput_metrics
******************************************************************************/