aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2016-08-15 11:25:05 -0700
committerMartin Braun <martin.braun@ettus.com>2016-09-02 11:10:46 -0700
commit27d0c654ac11158827d17d338da42db1549e56d4 (patch)
tree44b3893bce2ca610b4abe7eaec786dc126796048 /host/lib/transport
parent7ea624b179cfb2cd6204be4dc128ba7ef07f4546 (diff)
downloaduhd-27d0c654ac11158827d17d338da42db1549e56d4.tar.gz
uhd-27d0c654ac11158827d17d338da42db1549e56d4.tar.bz2
uhd-27d0c654ac11158827d17d338da42db1549e56d4.zip
N200: Simplify GPSDO UART so it does not strip or add characters
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/udp_simple.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp
index 8b6e5eb2b..43414feaa 100644
--- a/host/lib/transport/udp_simple.cpp
+++ b/host/lib/transport/udp_simple.cpp
@@ -115,13 +115,10 @@ public:
//drain anything in current buffer
while (_off < _len){
const char ch = _buf[_off++];
- if (ch == '\r') continue;
- if (ch == '\n' and _line.empty()) continue;
_line += ch;
if (ch == '\n')
{
- line = _line;
- _line.clear();
+ line.swap(_line);
return line;
}
}