[Olsr-cvs] olsrd-current/src/olsr_switch ohs_cmd.c,1.19,1.20
Andreas T�nnesen
(spam-protected)
Sun Nov 20 21:45:35 CET 2005
Update of /cvsroot/olsrd/olsrd-current/src/olsr_switch
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2607
Modified Files:
ohs_cmd.c
Log Message:
Fix for EOL detection from stdin. Patch from Bernd
Index: ohs_cmd.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/ohs_cmd.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ohs_cmd.c 12 Nov 2005 08:07:43 -0000 1.19
--- ohs_cmd.c 20 Nov 2005 20:45:33 -0000 1.20
***************
*** 603,606 ****
--- 603,610 ----
fgets(cmd_line, sizeof (cmd_line), stdin);
+ if(fgets(cmd_line, sizeof (cmd_line), stdin) == NULL) {
+ ohs_cmd_exit(NULL);
+ }
+
for (cmd_len = 0; cmd_line[cmd_len] != 0 && cmd_line[cmd_len] != '\n';
cmd_len++);
More information about the Olsr-cvs
mailing list