summaryrefslogtreecommitdiffstats
path: root/src/dabOutput
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-23 08:57:43 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-23 08:57:43 +0100
commitacfabd815f1be870ea01120248384c663832e2b2 (patch)
tree9fe568ce8807f16f94a41af986590013da2a971e /src/dabOutput
parente3bdb3bb6e089dadff0727e86fb7441bcc58c788 (diff)
downloaddabmux-acfabd815f1be870ea01120248384c663832e2b2.tar.gz
dabmux-acfabd815f1be870ea01120248384c663832e2b2.tar.bz2
dabmux-acfabd815f1be870ea01120248384c663832e2b2.zip
Handle download failure in TAI bulletin download and replace boost regex with std
Diffstat (limited to 'src/dabOutput')
-rw-r--r--src/dabOutput/dabOutputUdp.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dabOutput/dabOutputUdp.cpp b/src/dabOutput/dabOutputUdp.cpp
index 20e0c40..c129569 100644
--- a/src/dabOutput/dabOutputUdp.cpp
+++ b/src/dabOutput/dabOutputUdp.cpp
@@ -33,7 +33,7 @@
#include <cstring>
#include <cstdlib>
-#include <boost/regex.hpp>
+#include <regex>
#include <string>
#include <cstdio>
#include <limits.h>
@@ -54,14 +54,14 @@
int DabOutputUdp::Open(const char* name)
{
using namespace std;
- using namespace boost;
const string uri_without_proto(name);
regex re_url("([^:]+):([0-9]+)(.*)");
regex re_query("[?](?:src=([^&,]+))(?:[&,]ttl=([0-9]+))?");
smatch what;
- if (regex_match(uri_without_proto, what, re_url, match_default)) {
+ if (regex_match(uri_without_proto, what, re_url,
+ regex_constants::match_default)) {
string address = what[1];
if (this->packet_->getAddress().setAddress(address.c_str()) == -1) {
@@ -83,7 +83,8 @@ int DabOutputUdp::Open(const char* name)
string query_params = what[3];
smatch query_what;
- if (regex_match(query_params, query_what, re_query, match_default)) {
+ if (regex_match(query_params, query_what, re_query,
+ regex_constants::match_default)) {
string src = query_what[1];
int err = socket_->setMulticastSource(src.c_str());