summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2012-07-10 19:15:32 (UTC)
committer Michael Krelin <hacker@klever.net>2012-07-10 19:15:32 (UTC)
commit6242fdc322cecae7e9d71b390f91ef9dc8f1a162 (patch) (side-by-side diff)
treeb29e6d62e04e367ccbf2de5ac795a916e0802739
parent33b54aac6cf407e97858b7f96bd82c95b60299d3 (diff)
downloadiii-6242fdc322cecae7e9d71b390f91ef9dc8f1a162.zip
iii-6242fdc322cecae7e9d71b390f91ef9dc8f1a162.tar.gz
iii-6242fdc322cecae7e9d71b390f91ef9dc8f1a162.tar.bz2
it's more like info rather than debug
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--src/eyefiservice.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/eyefiservice.cc b/src/eyefiservice.cc
index f8d5f31..93bbcca 100644
--- a/src/eyefiservice.cc
+++ b/src/eyefiservice.cc
@@ -39,13 +39,11 @@ static int E(eyefiService* efs,const char *c,const std::exception& e) {
int eyefiService::StartSession(
std::string macaddress,std::string cnonce,
int transfermode,long transfermodetimestamp,
struct rns__StartSessionResponse &r ) try {
-#ifndef NDEBUG
- syslog(LOG_DEBUG,
+ syslog(LOG_INFO,
"StartSession request from %s with cnonce=%s, transfermode=%d, transfermodetimestamp=%ld",
macaddress.c_str(), cnonce.c_str(), transfermode, transfermodetimestamp );
-#endif
eyekinfig_t eyekinfig(macaddress);
r.credential = binary_t(macaddress+cnonce+eyekinfig.get_upload_key()).md5().hex();
r.snonce = session_nonce.make_nonce().hex();
@@ -72,14 +70,12 @@ int eyefiService::GetPhotoStatus(
std::string credential, std::string macaddress,
std::string filename, long filesize, std::string filesignature,
int flags,
struct rns__GetPhotoStatusResponse &r ) try {
-#ifndef NDEBUG
- syslog(LOG_DEBUG,
+ syslog(LOG_INFO,
"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() );
-#endif
std::string computed_credential = binary_t(macaddress+eyekinfig_t(macaddress).get_upload_key()+session_nonce.hex()).md5().hex();
#ifndef NDEBUG
@@ -94,13 +90,11 @@ int eyefiService::GetPhotoStatus(
int eyefiService::MarkLastPhotoInRoll(
std::string macaddress, int mergedelta,
struct rns__MarkLastPhotoInRollResponse&/* r */ ) try {
-#ifndef NDEBUG
- syslog(LOG_DEBUG,
+ syslog(LOG_INFO,
"MarkLastPhotoInRoll request from %s with mergedelta=%d",
macaddress.c_str(), mergedelta );
-#endif
std::string cmd = eyekinfig_t(macaddress).get_on_mark_last_photo_in_roll();
if(!cmd.empty()) {
if(detached_child()) {
putenv( gnu::autosprintf("EYEFI_MACADDRESS=%s",macaddress.c_str()) );
@@ -119,15 +113,13 @@ int eyefiService::UploadPhoto(
int fileid, std::string macaddress,
std::string filename, long filesize, std::string filesignature,
std::string encryption, int flags,
struct rns__UploadPhotoResponse& r ) try {
-#ifndef NDEBUG
- syslog(LOG_DEBUG,
+ syslog(LOG_INFO,
"UploadPhoto request from %s with fileid=%d, filename=%s, filesize=%ld,"
" filesignature=%s, encryption=%s, flags=%04X",
macaddress.c_str(), fileid, filename.c_str(), filesize,
filesignature.c_str(), encryption.c_str(), flags );
-#endif
std::string::size_type fnl=filename.length();
if(fnl<sizeof(".tar") || strncmp(filename.c_str()+fnl-sizeof(".tar")+sizeof(""),".tar",sizeof(".tar")))
throw std::runtime_error(gnu::autosprintf("honestly, I expected the tarball coming here, not '%s'",filename.c_str()));
std::string the_file(filename,0,fnl-sizeof(".tar")+sizeof(""));