FreeCalypso > hg > freecalypso-sw
changeset 185:ec040f521cc2
rvinterf works after fixing max_fd
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 24 Nov 2013 20:27:21 +0000 |
parents | 4714fdfca39c |
children | faa31a47f102 |
files | rvinterf/lowlevel/clientcmd.c rvinterf/lowlevel/localsock.c |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/lowlevel/clientcmd.c Sun Nov 24 08:40:44 2013 +0000 +++ b/rvinterf/lowlevel/clientcmd.c Sun Nov 24 20:27:21 2013 +0000 @@ -18,6 +18,7 @@ struct client *cli; { int c; + char logmsg[128]; switch (cli->rx_buf[0]) { case CLI2RVI_WANT_RVTRACE: @@ -37,6 +38,10 @@ cli->int_rvt_match[c] = cli->rx_buf[5] << 24 | cli->rx_buf[6] << 16 | cli->rx_buf[7] << 8 | cli->rx_buf[8]; + sprintf(logmsg, + "*** Client program interested in RVT mask %08X match %08X", + cli->int_rvt_mask[c], cli->int_rvt_match[c]); + output_line(logmsg); cli->int_rvt_count++; send_local_msg_to_client(cli, "+OK"); return; @@ -50,6 +55,10 @@ "-Unsupported protocol MUX value"); return; } + sprintf(logmsg, + "*** Client program interested in MUX proto %02X", + cli->rx_buf[1]); + output_line(logmsg); cli->int_proto[cli->rx_buf[1] - 0x12] = 1; send_local_msg_to_client(cli, "+OK"); return;
--- a/rvinterf/lowlevel/localsock.c Sun Nov 24 08:40:44 2013 +0000 +++ b/rvinterf/lowlevel/localsock.c Sun Nov 24 20:27:21 2013 +0000 @@ -97,6 +97,8 @@ perror("rvinterf: accept"); exit(1); } + if (rc > max_fd) + max_fd = rc; newcli = malloc(sizeof(struct client)); if (!newcli) { perror("rvinterf: malloc for new client"); @@ -107,6 +109,7 @@ newcli->next = client_head; client_head = newcli; prep_for_length_rx(newcli); + output_line("*** Client program connected"); return(0); } @@ -135,6 +138,7 @@ cc = read(cli->fd, cli->rx_ptr, cli->rx_left); if (cc <= 0) { /* normal client exit condition */ + output_line("*** Client program disconnected"); close_socket: cli->rx_state = 2; return; }