summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Zeller <luz@synthesis.ch>2009-10-08 10:53:20 +0200
committerLukas Zeller <luz@synthesis.ch>2009-10-08 10:53:20 +0200
commit139f90cf9ebd0f26ebdcc1bf8c5f35e89d75884c (patch)
tree2ffd4363ca68ea2ed16e6ac2bec90d617eb02c46
parent8c807878d599f453556518128eba53dcae3a30a3 (diff)
parente3270312efe5170dde44940da96d8e4df2d81d8d (diff)
Merge branch 'luz' into unilib
-rw-r--r--configure.in5
-rwxr-xr-xsrc/sysync_SDK/Sources/san.cpp (renamed from src/sysync/san.cpp)14
-rw-r--r--src/sysync_SDK/Sources/san.h (renamed from src/sysync/san.h)0
-rwxr-xr-xsrc/sysync_SDK/Sources/sysync_b64.cpp (renamed from src/sysync/sysync_b64.cpp)8
-rwxr-xr-xsrc/sysync_SDK/Sources/sysync_b64.h (renamed from src/sysync/sysync_b64.h)0
-rwxr-xr-xsrc/sysync_SDK/Sources/sysync_md5.cpp (renamed from src/sysync/sysync_md5.cpp)0
-rwxr-xr-xsrc/sysync_SDK/Sources/sysync_md5.h (renamed from src/sysync/sysync_md5.h)0
7 files changed, 18 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index b7c015d..a305768 100644
--- a/configure.in
+++ b/configure.in
@@ -116,5 +116,10 @@ if test "$enable_shared" = "no"; then
fi
AM_CONDITIONAL([COND_STATIC], [test "$enable_shared" = "no"])
+# Disable unconditionally at the moment. Would add dependency of SDK
+# on SyncML Toolkit.
+AC_DEFINE(WITHOUT_SAN_1_1, 1,
+ [support for Server Alerted Notifications according to SyncML 1.1])
+
AC_CONFIG_FILES(Makefile src/Makefile synthesis.pc)
AC_OUTPUT
diff --git a/src/sysync/san.cpp b/src/sysync_SDK/Sources/san.cpp
index a2e083a..e9fce70 100755
--- a/src/sysync/san.cpp
+++ b/src/sysync_SDK/Sources/san.cpp
@@ -59,12 +59,17 @@ digest= H(B64(H(server-identifier:password)):nonce:B64(H(notification)))
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "prefix_file.h"
+#include "sync_include.h"
#include "san.h"
#include "sysync_md5.h"
#include "sysync_b64.h"
-#ifndef PUSHALERTER
+#ifndef WITHOUT_SAN_1_1
#include "sysync_utils.h"
#endif
@@ -352,8 +357,7 @@ void SanPackage::ReleaseNotificationBody()
} // ReleaseNotificationBody
-// not available for pushalerter tool
-#ifndef PUSHALERTER
+#ifndef WITHOUT_SAN_1_1
// general callback entry for all others
static Ret_t univ( ... )
{
@@ -503,7 +507,7 @@ TSyError SanPackage::Check_11( void* san, size_t sanSize )
return err;
} // Check_11
-#endif
+#endif // WITHOUT_SAN_1_1
TSyError SanPackage::PassSan( void* san, size_t sanSize )
@@ -514,7 +518,7 @@ TSyError SanPackage::PassSan( void* san, size_t sanSize )
ReleasePackage();
//printf( "here we will have the potential 1.1 -> 1.2 conversion\n" );
- #ifndef PUSHALERTER
+ #ifndef WITHOUT_SAN_1_1
err= Check_11 ( san,sanSize );
if (!err) err= GetPackage( san,sanSize );
//use_as_12= err==SML_ERR_XLT_INCOMP_WBXML_VERS;
diff --git a/src/sysync/san.h b/src/sysync_SDK/Sources/san.h
index 6043365..6043365 100644
--- a/src/sysync/san.h
+++ b/src/sysync_SDK/Sources/san.h
diff --git a/src/sysync/sysync_b64.cpp b/src/sysync_SDK/Sources/sysync_b64.cpp
index eed6fb2..e1635ad 100755
--- a/src/sysync/sysync_b64.cpp
+++ b/src/sysync_SDK/Sources/sysync_b64.cpp
@@ -6,7 +6,7 @@
#include <string.h>
#include "sysync_b64.h"
-#include "profiling.h"
+#include "sync_include.h"
using namespace b64;
@@ -55,7 +55,7 @@ char *b64::encode (const uInt8 *instr, uInt32 len, uInt32 *outlenP, sInt16 maxLi
(outlen/maxLineLen+1) << (crLineEnd ? 0 : 1);
}
- outstr = (char *)sysync_malloc(outlen*sizeof(char));
+ outstr = (char *)malloc(outlen*sizeof(char));
memset(outstr,0,outlen);
linechars=0;
@@ -146,7 +146,7 @@ uInt8 *b64::decode(const char *instr, uInt32 len, uInt32 *outlenP)
// this should always be more than enough len:
// 3 times number of quads touched plus one for NUL terminator
- outstr = (uInt8 *)sysync_malloc(((3*(len/4+1))+1) * sizeof(char));
+ outstr = (uInt8 *)malloc(((3*(len/4+1))+1) * sizeof(char));
if (!outstr) return NULL;
q=outstr;
@@ -237,7 +237,7 @@ uInt8 *b64::decode(const char *instr, uInt32 len, uInt32 *outlenP)
// this should always be more than enough len
outlen = (3*(quads+1))+1;
- outstr = (uInt8 *)sysync_malloc(outlen * sizeof(char));
+ outstr = (uInt8 *)malloc(outlen * sizeof(char));
memset(outstr,0,outlen);
for (i = 0; i < quads; i++) {
diff --git a/src/sysync/sysync_b64.h b/src/sysync_SDK/Sources/sysync_b64.h
index d10094b..d10094b 100755
--- a/src/sysync/sysync_b64.h
+++ b/src/sysync_SDK/Sources/sysync_b64.h
diff --git a/src/sysync/sysync_md5.cpp b/src/sysync_SDK/Sources/sysync_md5.cpp
index 7655e1b..7655e1b 100755
--- a/src/sysync/sysync_md5.cpp
+++ b/src/sysync_SDK/Sources/sysync_md5.cpp
diff --git a/src/sysync/sysync_md5.h b/src/sysync_SDK/Sources/sysync_md5.h
index f438996..f438996 100755
--- a/src/sysync/sysync_md5.h
+++ b/src/sysync_SDK/Sources/sysync_md5.h