Skip to content

Update server.c to add "*" after callsign of digipeater with h bit set to show in connected AGW clients #530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,10 +992,22 @@ static void mon_addrs (int chan, packet_t pp, char *result, int result_size)
int j;

ax25_get_addr_with_ssid (pp, AX25_REPEATER_1, via);

// in case of only one digi with h bit set to give it a "*": next 4 lines added
int heard = ax25_get_heard(pp);
if (heard == 2) {
strlcat (via, "*", sizeof(via));
}

for (j = 1; j < num_digi; j++) {
ax25_get_addr_with_ssid (pp, AX25_REPEATER_1 + j, stemp);
strlcat (via, ",", sizeof(via));
strlcat (via, stemp, sizeof(via));

// in case of more than one digi to give a "*" if h bit is set: next 3 lines added
if (j+2 == heard) {
strlcat (via, "*", sizeof(via));
}
}
snprintf (result, result_size, " %d:Fm %s To %s Via %s ",
chan+1, src, dst, via);
Expand Down