summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2012-01-21 13:49:46 (UTC)
committer Michael Krelin <hacker@klever.net>2012-01-21 13:57:59 (UTC)
commitf62b5898696f988a9c01f0de2d2a3d45c648beea (patch) (unidiff)
treeeb1ee7fb0e71271f4fb561f32cc86ac4a7c8b6bc
parent225ebc36b2eadcf04c7e41ff037b62fd16144cc7 (diff)
downloadiii-f62b5898696f988a9c01f0de2d2a3d45c648beea.zip
iii-f62b5898696f988a9c01f0de2d2a3d45c648beea.tar.gz
iii-f62b5898696f988a9c01f0de2d2a3d45c648beea.tar.bz2
older gsoap compatibility
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/eyefiservice.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eyefiservice.cc b/src/eyefiservice.cc
index d9318ed..f8d5f31 100644
--- a/src/eyefiservice.cc
+++ b/src/eyefiservice.cc
@@ -20,33 +20,33 @@ static bool detached_child() {
20 _exit(-1); 20 _exit(-1);
21 } 21 }
22 if(!p) { 22 if(!p) {
23 setsid(); 23 setsid();
24 for(int i=getdtablesize();i>=0;--i) close(i); 24 for(int i=getdtablesize();i>=0;--i) close(i);
25 int i=open("/dev/null",O_RDWR); assert(i==0); 25 int i=open("/dev/null",O_RDWR); assert(i==0);
26 i = dup(i); assert(i==1); 26 i = dup(i); assert(i==1);
27 i = dup(i); assert(i==2); 27 i = dup(i); assert(i==2);
28 return true; 28 return true;
29 } 29 }
30 return false; 30 return false;
31} 31}
32 32
33static int E(eyefiService* efs,const char *c,const std::exception& e) { 33static int E(eyefiService* efs,const char *c,const std::exception& e) {
34 efs->keep_alive=0; 34 efs->keep_alive=0;
35 syslog(LOG_ERR,"error while processing %s: %s",c,e.what()); 35 syslog(LOG_ERR,"error while processing %s: %s",c,e.what());
36 return efs->soap_receiverfault(gnu::autosprintf("error processing %s",c),0); 36 return soap_sender_fault(efs,gnu::autosprintf("error processing %s",c),0);
37} 37}
38 38
39int eyefiService::StartSession( 39int eyefiService::StartSession(
40 std::string macaddress,std::string cnonce, 40 std::string macaddress,std::string cnonce,
41 int transfermode,long transfermodetimestamp, 41 int transfermode,long transfermodetimestamp,
42 struct rns__StartSessionResponse &r ) try { 42 struct rns__StartSessionResponse &r ) try {
43#ifndef NDEBUG 43#ifndef NDEBUG
44 syslog(LOG_DEBUG, 44 syslog(LOG_DEBUG,
45 "StartSession request from %s with cnonce=%s, transfermode=%d, transfermodetimestamp=%ld", 45 "StartSession request from %s with cnonce=%s, transfermode=%d, transfermodetimestamp=%ld",
46 macaddress.c_str(), cnonce.c_str(), transfermode, transfermodetimestamp ); 46 macaddress.c_str(), cnonce.c_str(), transfermode, transfermodetimestamp );
47#endif 47#endif
48 eyekinfig_t eyekinfig(macaddress); 48 eyekinfig_t eyekinfig(macaddress);
49 r.credential = binary_t(macaddress+cnonce+eyekinfig.get_upload_key()).md5().hex(); 49 r.credential = binary_t(macaddress+cnonce+eyekinfig.get_upload_key()).md5().hex();
50 50
51 r.snonce = session_nonce.make_nonce().hex(); 51 r.snonce = session_nonce.make_nonce().hex();
52 r.transfermode=transfermode; 52 r.transfermode=transfermode;