diff options
author | Peter Hatina <phatina@redhat.com> | 2011-10-03 08:20:10 +0200 |
---|---|---|
committer | Peter Hatina <phatina@redhat.com> | 2011-10-03 08:20:10 +0200 |
commit | 0dd49e42914bac3c30f6c731e8555b2273ddbc11 (patch) | |
tree | 63704f5a2712a3c274171eb1a1ce99e8637c9703 /SpiceXPI | |
parent | 30f5a4d57ceabdafde3ff1331662e8163d173e65 (diff) | |
parent | 40e929d99621f036ee0ac5dc90f6ccb844fac1a0 (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/spice/spice-xpi
Diffstat (limited to 'SpiceXPI')
-rw-r--r-- | SpiceXPI/src/plugin/plugin.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp index 82e81c2..e7ea27a 100644 --- a/SpiceXPI/src/plugin/plugin.cpp +++ b/SpiceXPI/src/plugin/plugin.cpp @@ -104,23 +104,6 @@ namespace { return dest; } - - std::string getSpicecPath() - { - std::set<std::string> names; - names.insert("/usr/libexec/spicec"); - names.insert("/usr/bin/spicec"); - - struct stat file; - std::set<std::string>::iterator it; - for (it = names.begin(); it != names.end(); ++it) - { - if (stat(it->c_str(), &file) == 0) - return *it; - } - - return std::string(); - } } char *NPP_GetMIMEDescription(void) @@ -571,18 +554,14 @@ void nsPluginInstance::Connect() LOG_DEBUG("child pid: " << child); if (child == 0) { - std::string spicec_path = getSpicecPath(); - if (spicec_path.empty()) - { - LOG_ERROR("ERROR failed to find spicec to run"); - exit(1); - } + execl("/usr/libexec/spice-xpi-client", "/usr/libexec/spice-xpi-client", NULL); + LOG_ERROR("ERROR failed to run spice-xpi-client"); - // run the controller - execl(spicec_path.c_str(), spicec_path.c_str(), "--controller", NULL); + // TODO: temporary fallback for backward compatibility + execl("/usr/bin/spicec", "/usr/bin/spicec", "--controller", NULL); + LOG_ERROR("ERROR failed to run spicec fallback"); - // failed to connect? - exit(0); + exit(1); } else { |