diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-09-02 11:27:37 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-09-02 11:27:37 -0700 |
commit | 83912104a9c1ab3631f755a4d98ee86e195db690 (patch) | |
tree | 4c7ba7da761b1b9b5508bffdb77b9e0696ff46ae /host/lib/transport | |
parent | 670eeda6e4c9ff2ab81f4e387bce49ea4dc79dcc (diff) | |
parent | 065065e90ce970f8eed0941ded6ae4377e649c2b (diff) | |
download | uhd-83912104a9c1ab3631f755a4d98ee86e195db690.tar.gz uhd-83912104a9c1ab3631f755a4d98ee86e195db690.tar.bz2 uhd-83912104a9c1ab3631f755a4d98ee86e195db690.zip |
Merge branch 'UHD-3.9.LTS' into maint
This provides the GPS fixes.
Conflicts:
host/CMakeLists.txt
tools/debs/upload_debs.sh
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 347373c71..43414feaa 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -114,9 +114,13 @@ public: do{ //drain anything in current buffer while (_off < _len){ - const char ch = _buf[_off]; _off++; - line += std::string(1, ch); - if (ch == '\n' or ch == '\r') return line; + const char ch = _buf[_off++]; + _line += ch; + if (ch == '\n') + { + line.swap(_line); + return line; + } } //recv a new packet into the buffer @@ -131,6 +135,7 @@ private: udp_simple::sptr _udp; size_t _len, _off; boost::uint8_t _buf[udp_simple::mtu]; + std::string _line; }; uhd::uart_iface::sptr udp_simple::make_uart(sptr udp){ |