Skip to content

Commit d51c16b

Browse files
committed
Issue 585. Only UI frames when monitoring own transmission.
1 parent 0a28e00 commit d51c16b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/server.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,8 @@ void server_send_monitored (int chan, packet_t pp, int own_xmit)
866866
* MONITOR format - 'I' for information frames.
867867
* 'U' for unnumbered information.
868868
* 'S' for supervisory and other unnumbered.
869+
*
870+
* 'T' for own transmitted frames.
869871
*/
870872
struct {
871873
struct agwpe_s hdr;
@@ -875,9 +877,7 @@ void server_send_monitored (int chan, packet_t pp, int own_xmit)
875877
int err;
876878

877879
for (int client=0; client<MAX_NET_CLIENTS; client++) {
878-
879880
if (enable_send_monitor_to_client[client] && client_sock[client] > 0) {
880-
881881
memset (&agwpe_msg.hdr, 0, sizeof(agwpe_msg.hdr));
882882

883883
agwpe_msg.hdr.portx = chan; // datakind is added later.
@@ -910,6 +910,11 @@ void server_send_monitored (int chan, packet_t pp, int own_xmit)
910910
char desc[120];
911911
agwpe_msg.hdr.datakind = mon_desc (pp, desc, sizeof(desc));
912912
if (own_xmit) {
913+
// Should we include all own transmitted frames or only UNPROTO?
914+
// Discussion: https://github.com/wb2osz/direwolf/issues/585
915+
if (agwpe_msg.hdr.datakind != 'U') {
916+
break;
917+
}
913918
agwpe_msg.hdr.datakind = 'T';
914919
}
915920
strlcat ((char*)(agwpe_msg.data), desc, sizeof(agwpe_msg.data));

0 commit comments

Comments
 (0)