[package] soloscli: fix new lines in soloscli
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 2 Jun 2011 14:38:01 +0000 (14:38 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 2 Jun 2011 14:38:01 +0000 (14:38 +0000)
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

package/soloscli/Makefile
package/soloscli/patches/001-newline.patch

index 1c2d998..490186d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=soloscli
 PKG_VERSION:=0.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=solos-pci-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/openadsl
index 69cd5b2..4b663e8 100644 (file)
@@ -1,11 +1,15 @@
 --- a/soloscli/soloscli.c
 +++ b/soloscli/soloscli.c
-@@ -238,7 +238,7 @@
+@@ -238,7 +238,11 @@
        }
        if (strcmp(buf,pid) == 0) {
  /*            printf("Sequence matches.\n"); */
 -              printf("%s",bufp);
-+              printf("%s\n",bufp);
++              if(buf[(len-1)] == '\n'){
++                      printf("%s",bufp);
++              } else {
++                      printf("%s\n",bufp);
++              }
        } else {
                printf("Sequence incorrect.\n");
                buf[i] = '\n';
This page took 0.031017 seconds and 4 git commands to generate.