mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Update: Make connection IDs it's own type
This commit is contained in:
parent
d08eba9607
commit
73f00d5934
@ -90,7 +90,7 @@ typedef struct client_queue_tag {
|
||||
} client_queue_t;
|
||||
|
||||
static spin_t _connection_lock; // protects _current_id, _con_queue, _con_queue_tail
|
||||
static volatile unsigned long _current_id = 0;
|
||||
static volatile connection_id_t _current_id = 0;
|
||||
static int _initialized = 0;
|
||||
|
||||
static volatile client_queue_t *_req_queue = NULL, **_req_queue_tail = &_req_queue;
|
||||
@ -149,9 +149,9 @@ void connection_reread_config(ice_config_t *config)
|
||||
listensocket_container_configure_and_setup(global.listensockets, config);
|
||||
}
|
||||
|
||||
static unsigned long _next_connection_id(void)
|
||||
static connection_id_t _next_connection_id(void)
|
||||
{
|
||||
unsigned long id;
|
||||
connection_id_t id;
|
||||
|
||||
thread_spin_lock(&_connection_lock);
|
||||
id = _current_id++;
|
||||
|
@ -24,8 +24,10 @@
|
||||
#include "common/thread/thread.h"
|
||||
#include "common/net/sock.h"
|
||||
|
||||
typedef unsigned long connection_id_t;
|
||||
|
||||
struct connection_tag {
|
||||
unsigned long id;
|
||||
connection_id_t id;
|
||||
|
||||
time_t con_time;
|
||||
time_t discon_time;
|
||||
|
Loading…
x
Reference in New Issue
Block a user