Skip to content

Commit 10d5146

Browse files
committed
chore: rename fn to something more obvious
1 parent 74e3ff8 commit 10d5146

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/conn.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static conn_mode_entry_t *get_mode_entry(juice_agent_t *agent) {
5757
return mode_entries + (int)mode;
5858
}
5959

60-
static conn_registry_t *get_registry(conn_mode_entry_t *entry, uint16_t port) {
60+
static conn_registry_t *get_port_registry(conn_mode_entry_t *entry, uint16_t port) {
6161
for (int i = 0; i < entry->registries_size; i++) {
6262
if (!entry->registries[i]) {
6363
continue;
@@ -125,7 +125,7 @@ static int add_registry(conn_mode_entry_t *entry, conn_registry_t *registry) {
125125

126126
static int acquire_registry(conn_mode_entry_t *entry, udp_socket_config_t *config) {
127127
// entry must be locked
128-
conn_registry_t *registry = get_registry(entry, config->port_begin);
128+
conn_registry_t *registry = get_port_registry(entry, config->port_begin);
129129

130130
if (!registry) {
131131
if (!entry->registry_init_func)
@@ -221,7 +221,7 @@ int conn_create(juice_agent_t *agent, udp_socket_config_t *config) {
221221
return -1;
222222
}
223223

224-
conn_registry_t *registry = get_registry(entry, config->port_begin);
224+
conn_registry_t *registry = get_port_registry(entry, config->port_begin);
225225

226226
JLOG_DEBUG("Creating connection");
227227
if (registry) {
@@ -349,7 +349,7 @@ static int juice_mux_stop_listen(const char *bind_address, int local_port) {
349349

350350
mutex_lock(&entry->mutex);
351351

352-
conn_registry_t *registry = get_registry(entry, local_port);
352+
conn_registry_t *registry = get_port_registry(entry, local_port);
353353
if (!registry) {
354354
mutex_unlock(&entry->mutex);
355355
return -1;
@@ -381,7 +381,7 @@ int juice_mux_listen(const char *bind_address, int local_port, juice_cb_mux_inco
381381

382382
mutex_lock(&entry->mutex);
383383

384-
if (get_registry(entry, local_port)) {
384+
if (get_port_registry(entry, local_port)) {
385385
mutex_unlock(&entry->mutex);
386386
JLOG_DEBUG("juice_mux_listen needs to be called before establishing any mux connection.");
387387
return -1;
@@ -392,7 +392,7 @@ int juice_mux_listen(const char *bind_address, int local_port, juice_cb_mux_inco
392392
return -1;
393393
}
394394

395-
conn_registry_t *registry = get_registry(entry, local_port);
395+
conn_registry_t *registry = get_port_registry(entry, local_port);
396396
if(!registry) {
397397
mutex_unlock(&entry->mutex);
398398
return -1;

0 commit comments

Comments
 (0)