mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Update: Replaced listensocket_container_new()
This commit is contained in:
parent
b875e80230
commit
fea817da2d
@ -1703,7 +1703,7 @@ void connection_setup_sockets (ice_config_t *config)
|
||||
allowed_ip = matchfile_new(config->allowfile);
|
||||
}
|
||||
|
||||
global.listensockets = listensocket_container_new();
|
||||
global.listensockets = refobject_new(listensocket_container_t);
|
||||
listensocket_container_configure(global.listensockets, config);
|
||||
|
||||
global_unlock();
|
||||
|
@ -150,26 +150,25 @@ static void __listensocket_container_free(refobject_t self, void **userdata)
|
||||
thread_mutex_destroy(&container->lock);
|
||||
}
|
||||
|
||||
REFOBJECT_DEFINE_TYPE(listensocket_container_t,
|
||||
REFOBJECT_DEFINE_TYPE_FREE(__listensocket_container_free)
|
||||
);
|
||||
|
||||
listensocket_container_t * listensocket_container_new(void)
|
||||
int __listensocket_container_new(refobject_t self, const refobject_type_t *type, va_list ap)
|
||||
{
|
||||
listensocket_container_t *self = refobject_new__new(listensocket_container_t, NULL, NULL, NULL);
|
||||
if (!self)
|
||||
return NULL;
|
||||
listensocket_container_t *ret = REFOBJECT_TO_TYPE(self, listensocket_container_t*);
|
||||
|
||||
self->sock = NULL;
|
||||
self->sock_len = 0;
|
||||
self->sockcount_cb = NULL;
|
||||
self->sockcount_userdata = NULL;
|
||||
ret->sock = NULL;
|
||||
ret->sock_len = 0;
|
||||
ret->sockcount_cb = NULL;
|
||||
ret->sockcount_userdata = NULL;
|
||||
|
||||
thread_mutex_create(&self->lock);
|
||||
thread_mutex_create(&ret->lock);
|
||||
|
||||
return self;
|
||||
return 0;
|
||||
}
|
||||
|
||||
REFOBJECT_DEFINE_TYPE(listensocket_container_t,
|
||||
REFOBJECT_DEFINE_TYPE_FREE(__listensocket_container_free),
|
||||
REFOBJECT_DEFINE_TYPE_NEW(__listensocket_container_new)
|
||||
);
|
||||
|
||||
static inline void __find_matching_entry(listensocket_container_t *self, const listener_t *listener, listensocket_t ***found, int **ref)
|
||||
{
|
||||
const listener_t *b;
|
||||
|
Loading…
Reference in New Issue
Block a user