diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-06-21 21:56:59 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-06-21 22:10:44 +0200 |
commit | 1328d62f9d3a2eb9f089d531614302005c29ec37 (patch) | |
tree | 17c179b21813f3dbea0d83535d0523dd411908f8 /src/utils.cpp | |
parent | 711f52b5a1f114ae911d0e072498c81831c0b814 (diff) | |
download | dabmux-1328d62f9d3a2eb9f089d531614302005c29ec37.tar.gz dabmux-1328d62f9d3a2eb9f089d531614302005c29ec37.tar.bz2 dabmux-1328d62f9d3a2eb9f089d531614302005c29ec37.zip |
Replace MGMT socket by ZMQ, make services shared_ptr
Diffstat (limited to 'src/utils.cpp')
-rw-r--r-- | src/utils.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/utils.cpp b/src/utils.cpp index 50591ae..42937c1 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -366,28 +366,27 @@ void printOutputs(vector<boost::shared_ptr<DabOutput> >& outputs) } } -void printServices(vector<DabService*>& services) +void printServices(const vector<shared_ptr<DabService> >& services) { - vector<DabService*>::const_iterator current; int index = 0; - for (current = services.begin(); current != services.end(); ++current) { + for (auto service : services) { - etiLog.level(info) << "Service " << (*current)->get_rc_name(); + etiLog.level(info) << "Service " << service->get_rc_name(); etiLog.level(info) << " label: " << - (*current)->label.long_label(); + service->label.long_label(); etiLog.level(info) << " short label: " << - (*current)->label.short_label(); + service->label.short_label(); - etiLog.log(info, " (0x%x)", (*current)->label.flag()); - etiLog.log(info, " id: 0x%lx (%lu)", (*current)->id, - (*current)->id); + etiLog.log(info, " (0x%x)", service->label.flag()); + etiLog.log(info, " id: 0x%lx (%lu)", service->id, + service->id); - etiLog.log(info, " pty: 0x%x (%u)", (*current)->pty, - (*current)->pty); + etiLog.log(info, " pty: 0x%x (%u)", service->pty, + service->pty); etiLog.log(info, " language: 0x%x (%u)", - (*current)->language, (*current)->language); + service->language, service->language); ++index; } } |