summaryrefslogtreecommitdiff
path: root/libkms++/card.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++/card.cpp')
-rw-r--r--libkms++/card.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 5f8dbd1..39a1fb6 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -107,12 +107,20 @@ Card::Card()
Card::~Card()
{
+ restore_modes();
+
for (auto pair : m_obmap)
delete pair.second;
close(m_fd);
}
+void Card::restore_modes()
+{
+ for (auto conn : get_connectors())
+ conn->restore_mode();
+}
+
template <class T> static void print_obs(const map<uint32_t, DrmObject*>& obmap)
{
for (auto pair : obmap) {