mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-18 08:45:20 +02:00
9a842645c0
If the string received from the ADSL firmware is missing \n, add it in. Signed-off-by: Nathan Williams <nathan@traverse.com.au> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27096 3c298f89-4303-0410-b956-a3cf2f4a3e73
16 lines
327 B
Diff
16 lines
327 B
Diff
--- a/soloscli/soloscli.c
|
|
+++ b/soloscli/soloscli.c
|
|
@@ -238,7 +238,11 @@
|
|
}
|
|
if (strcmp(buf,pid) == 0) {
|
|
/* printf("Sequence matches.\n"); */
|
|
- printf("%s",bufp);
|
|
+ if(buf[(len-1)] == '\n'){
|
|
+ printf("%s",bufp);
|
|
+ } else {
|
|
+ printf("%s\n",bufp);
|
|
+ }
|
|
} else {
|
|
printf("Sequence incorrect.\n");
|
|
buf[i] = '\n';
|