summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2012-01-20 20:46:10 (UTC)
committer Michael Krelin <hacker@klever.net>2012-01-20 20:46:10 (UTC)
commita9f093cc83926b0e83324aa9e022903563d9d801 (patch) (side-by-side diff)
treeedb99733968e4617d386406f23aab1f5788eea70
parent6258fb1baaaa46a828fd6753b9401880b9b63aec (diff)
downloadiii-a9f093cc83926b0e83324aa9e022903563d9d801.zip
iii-a9f093cc83926b0e83324aa9e022903563d9d801.tar.gz
iii-a9f093cc83926b0e83324aa9e022903563d9d801.tar.bz2
return fault in case of (unsurprisingly) failure
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/eyefiservice.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eyefiservice.cc b/src/eyefiservice.cc
index 9ef4bb6..2586ade 100644
--- a/src/eyefiservice.cc
+++ b/src/eyefiservice.cc
@@ -53,24 +53,25 @@ int eyefiService::StartSession(
putenv( gnu::autosprintf("EYEFI_MACADDRESS=%s",macaddress.c_str()) );
putenv( gnu::autosprintf("EYEFI_TRANSFERMODE=%d",transfermode) );
putenv( gnu::autosprintf("EYEFI_TRANSFERMODETIMESTAMP=%ld",transfermodetimestamp) );
char *argv[] = { (char*)"/bin/sh", (char*)"-c", (char*)cmd.c_str(), 0 };
execv("/bin/sh",argv);
syslog(LOG_ERR,"Failed to execute '%s'",cmd.c_str());
_exit(-1);
}
}
return SOAP_OK;
}catch(std::runtime_error& e) {
syslog(LOG_ERR,"error while processing StartSession: %s",e.what());
+ return soap_receiverfault(e.what(),0);
}
int eyefiService::GetPhotoStatus(
std::string credential, std::string macaddress,
std::string filename, long filesize, std::string filesignature,
int flags,
struct rns__GetPhotoStatusResponse &r ) {
#ifndef NDEBUG
syslog(LOG_DEBUG,
"GetPhotoStatus request from %s with credential=%s, filename=%s, filesize=%ld, filesignature=%s, flags=%d; session nonce=%s",
macaddress.c_str(), credential.c_str(), filename.c_str(), filesize, filesignature.c_str(), flags,
session_nonce.hex().c_str() );