1
0
mirror of https://github.com/lxsang/antd-tunnel-plugin synced 2024-11-16 01:38:22 +01:00

fix overflow bug

This commit is contained in:
lxsang 2020-11-29 14:39:10 +01:00
parent 5a3f4fc81d
commit 61e7040426
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -63,7 +63,7 @@ typedef struct {
bst_node_t* channels;
pthread_t tid;
int hotline;
uint32_t id_allocator;
uint16_t id_allocator;
uint8_t initialized;
} antd_tunnel_t;
@ -760,7 +760,7 @@ static void process_client_message(antd_tunnel_msg_t* msg, antd_client_t* client
if(msg->header.type == CHANNEL_SUBSCRIBE)
{
g_tunnel.id_allocator++;
channel->subscribers = bst_insert(channel->subscribers, g_tunnel.id_allocator, client);
channel->subscribers = bst_insert(channel->subscribers, (int)g_tunnel.id_allocator, client);
// sent ok to client
msg->header.type = CHANNEL_OK;
msg->header.channel_id = hash_val;