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:
parent
5a3f4fc81d
commit
61e7040426
BIN
dist/tunnel-0.1.0b.tar.gz
vendored
BIN
dist/tunnel-0.1.0b.tar.gz
vendored
Binary file not shown.
4
tunnel.c
4
tunnel.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user