FreeCalypso > hg > freecalypso-sw
changeset 870:2682003dcba7
rvinterf: client programs can now register to receive AT and EXTUI packets
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Fri, 29 May 2015 06:16:02 +0000 |
parents | 4cf69e1c784c |
children | a5c8f48003cd |
files | rvinterf/lowlevel/client.h rvinterf/lowlevel/clientcmd.c rvinterf/lowlevel/rvifmain.c |
diffstat | 3 files changed, 9 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/lowlevel/client.h Fri May 29 05:13:47 2015 +0000 +++ b/rvinterf/lowlevel/client.h Fri May 29 06:16:02 2015 +0000 @@ -18,5 +18,5 @@ int int_rvt_count; u32 int_rvt_mask[MAX_RVT_INTEREST]; u32 int_rvt_match[MAX_RVT_INTEREST]; - char int_proto[8]; + char int_proto[10]; };
--- a/rvinterf/lowlevel/clientcmd.c Fri May 29 05:13:47 2015 +0000 +++ b/rvinterf/lowlevel/clientcmd.c Fri May 29 06:16:02 2015 +0000 @@ -18,7 +18,6 @@ struct client *cli; { int c; - char logmsg[128]; switch (cli->rx_buf[0]) { case CLI2RVI_WANT_RVTRACE: @@ -38,12 +37,6 @@ cli->int_rvt_match[c] = cli->rx_buf[5] << 24 | cli->rx_buf[6] << 16 | cli->rx_buf[7] << 8 | cli->rx_buf[8]; -#if 0 - sprintf(logmsg, - "*** Client program interested in RVT mask %08X match %08X", - cli->int_rvt_mask[c], cli->int_rvt_match[c]); - output_line(logmsg); -#endif cli->int_rvt_count++; send_local_msg_to_client(cli, "+OK"); return; @@ -52,17 +45,11 @@ send_local_msg_to_client(cli, "-Bad command length"); return; } - if (cli->rx_buf[1] < 0x12 || cli->rx_buf[1] > 0x18) { + if (cli->rx_buf[1] < 0x12 || cli->rx_buf[1] > 0x1B) { send_local_msg_to_client(cli, "-Unsupported protocol MUX value"); return; } -#if 0 - sprintf(logmsg, - "*** Client program interested in MUX proto %02X", - cli->rx_buf[1]); - output_line(logmsg); -#endif cli->int_proto[cli->rx_buf[1] - 0x12] = 1; send_local_msg_to_client(cli, "+OK"); return;
--- a/rvinterf/lowlevel/rvifmain.c Fri May 29 05:13:47 2015 +0000 +++ b/rvinterf/lowlevel/rvifmain.c Fri May 29 06:16:02 2015 +0000 @@ -173,6 +173,13 @@ if (client_head) forward_nonrvt_pkt(); return; + case RVT_AT_HEADER: + case RVT_EXTUI_HEADER: + if (!no_output || logF) + print_unknown_packet(); /* formatting TBD */ + if (client_head) + forward_nonrvt_pkt(); + return; case '*': print_fc_lld_msg(); return;