Skip to content

Commit 81e5c5c

Browse files
authored
Update server.c to add "*" after callsign of digipeater with h bit set in connected AGW clients
1 parent 69407cc commit 81e5c5c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/server.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,10 +992,22 @@ static void mon_addrs (int chan, packet_t pp, char *result, int result_size)
992992
int j;
993993

994994
ax25_get_addr_with_ssid (pp, AX25_REPEATER_1, via);
995+
996+
// in case of only one digi with h bit set to give it a "*": next 4 lines added
997+
int heard = ax25_get_heard(pp);
998+
if (heard == 2) {
999+
strlcat (via, "*", sizeof(via));
1000+
}
1001+
9951002
for (j = 1; j < num_digi; j++) {
9961003
ax25_get_addr_with_ssid (pp, AX25_REPEATER_1 + j, stemp);
9971004
strlcat (via, ",", sizeof(via));
9981005
strlcat (via, stemp, sizeof(via));
1006+
1007+
// in case of more than one digi to give a "*" if h bit is set: next 3 lines added
1008+
if (j+2 == heard) {
1009+
strlcat (via, "*", sizeof(via));
1010+
}
9991011
}
10001012
snprintf (result, result_size, " %d:Fm %s To %s Via %s ",
10011013
chan+1, src, dst, via);

0 commit comments

Comments
 (0)