Commit 94c7ad6f authored by frtabu's avatar frtabu

minor fix after rebase on develop

parent 05875d7f
...@@ -688,10 +688,11 @@ void run_telnetclt(void) { ...@@ -688,10 +688,11 @@ void run_telnetclt(void) {
inet_aton("127.0.0.1", &addr) ; inet_aton("127.0.0.1", &addr) ;
name.sin_addr.s_addr = addr.s_addr; name.sin_addr.s_addr = addr.s_addr;
name.sin_port = htons((unsigned short)(telnetparams.listenport)); name.sin_port = htons((unsigned short)(telnetparams.listenport));
while (1) {
sock = socket(AF_INET, SOCK_STREAM, 0); sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) if (sock < 0)
fprintf(stderr,"[TELNETSRV] Error %s on socket call\n",strerror(errno)); fprintf(stderr,"[TELNETSRV] Error %s on socket call\n",strerror(errno));
if(connect(sock, (void *) &name, sizeof(name))) if(connect(sock, (void *) &name, sizeof(name)))
fprintf(stderr,"[TELNETSRV] Error %s on connect call\n",strerror(errno)); fprintf(stderr,"[TELNETSRV] Error %s on connect call\n",strerror(errno));
...@@ -742,6 +743,7 @@ void run_telnetclt(void) { ...@@ -742,6 +743,7 @@ void run_telnetclt(void) {
} }
} }
close(sock); close(sock);
}
return; return;
} /* run_telnetclt */ } /* run_telnetclt */
......
...@@ -162,7 +162,7 @@ int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt) { ...@@ -162,7 +162,7 @@ int measurcmd_show(char *buf, int debug, telnet_printfunc_t prnt) {
notifiedFIFO_elt_t *msg =newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL); notifiedFIFO_elt_t *msg =newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL);
time_stats_msg_t *msgdata=NotifiedFifoData(msg); time_stats_msg_t *msgdata=NotifiedFifoData(msg);
msgdata->msgid = TIMESTAT_MSGID_DISPLAY; msgdata->msgid = TIMESTAT_MSGID_DISPLAY;
msgdata->displayFunc = (void (*)(void *))prnt; msgdata->displayFunc = prnt;
pushNotifiedFIFO(&measur_fifo, msg); pushNotifiedFIFO(&measur_fifo, msg);
} else if ( strcmp(subcmd,"groups") == 0){ } else if ( strcmp(subcmd,"groups") == 0){
measurcmd_display_groups(prnt,measurgroups,num_measurgroups); measurcmd_display_groups(prnt,measurgroups,num_measurgroups);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment