Skip to content

fix: check ds_select_dst return value#143

Open
Amygos wants to merge 1 commit intomainfrom
fix-check-ds-select-dst-return
Open

fix: check ds_select_dst return value#143
Amygos wants to merge 1 commit intomainfrom
fix-check-ds-select-dst-return

Conversation

@Amygos
Copy link
Copy Markdown
Member

@Amygos Amygos commented Feb 23, 2026

Summary

If ds_select_dst() fails (e.g. no active destinations in dispatcher set), $du may retain a stale value from a previous request, causing misrouting. The failure was silently ignored.

Changes

  • Wrap ds_select_dst() in a return-value check in route[GET_ASTERISK_NODE]
  • Log L_ERR and return early on failure so caller can handle the missing destination

Impact

Prevents stale $du from sending calls to wrong destinations when all backends are down.

If ds_select_dst fails (no active destinations),
$du may retain a stale value causing misrouting.
Log error and return early on failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Amygos Amygos marked this pull request as ready for review February 23, 2026 08:54
@Amygos Amygos requested a review from paolovisintin February 23, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant