summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-12-02 12:55:46 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2023-12-02 13:15:58 +0100
commit40230a02c0630be311fb27aa68cd5e441801e67d (patch)
treeecebdb9c04c127e6f82e5dda9d41ce535ec0923a /src/main.cpp
parentf097f6473095fa04ff52ac7ee33a8dc435144a6f (diff)
Accept extended identity from device attachment
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b39130a..0eb379b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -417,8 +417,12 @@ void watchLocalIdentity(const vector<string> &)
if (idt) {
ostringstream ss;
ss << "local-identity";
- for (optional<Identity> i = idt; i; i = i->owner())
- ss << " " << i->name().value();
+ for (optional<Identity> i = idt; i; i = i->owner()) {
+ if (auto name = i->name())
+ ss << " " << i->name().value();
+ else
+ ss << " <unnamed>";
+ }
printLine(ss.str());
}
});