diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2012-02-29 11:48:15 +0100 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-03-01 09:26:40 +0200 |
commit | e342ef835732a3696c1eb41204896d125115576a (patch) | |
tree | 0927574f5016e1335d23c17ab9295a17a40a4ea5 | |
parent | 547d5081262921087d3c1e0a9c8b2ed19d3a9135 (diff) | |
download | spice-e342ef835732a3696c1eb41204896d125115576a.tar.gz spice-e342ef835732a3696c1eb41204896d125115576a.tar.xz spice-e342ef835732a3696c1eb41204896d125115576a.zip |
Fix compilation when smartcard support is disabled
The addition of smartcard control to the controller doesn't handle
the case when smartcard support is disabled at compile time. When
this is the case, this causes compile errors.
(cherry picked from commit a50619e7334ff3620034a8b2ea75ceeffd4a805a)
-rw-r--r-- | client/application.cpp | 2 | ||||
-rw-r--r-- | client/application.h | 2 | ||||
-rw-r--r-- | client/controller.cpp | 2 | ||||
-rw-r--r-- | client/controller.h | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/client/application.cpp b/client/application.cpp index cecc7126..482cece0 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -1689,10 +1689,12 @@ void Application::set_title(const std::string& title) } } +#ifdef USE_SMARTCARD void Application::enable_smartcard(bool enable) { _smartcard_options->enable = enable; } +#endif bool Application::is_key_set_pressed(const HotkeySet& key_set) { diff --git a/client/application.h b/client/application.h index 72501dd4..91d63ea6 100644 --- a/client/application.h +++ b/client/application.h @@ -227,7 +227,9 @@ public: void external_show(); void connect(); void switch_host(const std::string& host, int port, int sport, const std::string& cert_subject); +#ifdef USE_SMARTCARD void enable_smartcard(bool enable); +#endif const PeerConnectionOptMap& get_con_opt_map() {return _peer_con_opt;} const RedPeer::HostAuthOptions& get_host_auth_opt() { return _host_auth_opt;} diff --git a/client/controller.cpp b/client/controller.cpp index a0269be3..e0b7fe77 100644 --- a/client/controller.cpp +++ b/client/controller.cpp @@ -334,9 +334,11 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr) case CONTROLLER_DELETE_MENU: _handler->delete_menu(); break; +#if USE_SMARTCARD case CONTROLLER_ENABLE_SMARTCARD: _handler->enable_smartcard(value); break; +#endif case CONTROLLER_SEND_CAD: default: LOG_ERROR("Ignoring an unknown/SEND_CAD controller message %u", hdr->id); diff --git a/client/controller.h b/client/controller.h index ef996e94..a59d333d 100644 --- a/client/controller.h +++ b/client/controller.h @@ -50,7 +50,9 @@ public: virtual Menu* get_app_menu() = 0; virtual void set_menu(Menu* menu) = 0; virtual void delete_menu() = 0; +#ifdef USE_SMARTCARD virtual void enable_smartcard(bool enable) = 0; +#endif }; class Controller : public NamedPipe::ListenerInterface { |