Skip to content

Commit

Permalink
Fix callsign cache hash map inserts
Browse files Browse the repository at this point in the history
From what I can tell, this could result in callsign cache misses, but
more importantly could cause a cycle in the linked lists that results in
an infinite loop.

I believe this was only possible on proxy configurations with multiple
slots.
  • Loading branch information
cottsay committed Mar 18, 2024
1 parent 2955304 commit 2c7ca0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static void proxy_worker_func(struct worker_handle *wh)
pc->prev_by_call_ptr = &priv->clients_by_call[hash];
pc->next_by_call = priv->clients_by_call[hash];
if (pc->next_by_call != NULL)
pc->next_by_call->prev_by_call_ptr = &pc->next;
pc->next_by_call->prev_by_call_ptr = &pc->next_by_call;
priv->clients_by_call[hash] = pc;
mutex_unlock(&priv->idle_clients_mutex);

Expand Down

0 comments on commit 2c7ca0f

Please sign in to comment.