aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/jpilot.c14
3 files changed, 24 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c0e5e1f1..ef6eaac9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-15
+
+ * src/jpilot.c: applied the patch for libpisock12 support (fixes
+ AddressDB.pdb import failure). Thanks to Colin and Corey.
+
2006-11-14
* libsylph/utils.[ch]: added get_document_dir() which returns the
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 539bcaaa..5ec214cf 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2006-11-15
+
+ * src/jpilot.c: libpisock12 対応パッチを適用(AddressDB.pdb インポートに
+ 失敗するのを修正)。 Colin さんと Corey さん thanks。
+
2006-11-14
* libsylph/utils.[ch]: ドキュメントディレクトリを返す get_document_dir()
diff --git a/src/jpilot.c b/src/jpilot.c
index 4624e141..d456201b 100644
--- a/src/jpilot.c
+++ b/src/jpilot.c
@@ -42,10 +42,12 @@
# include <libpisock/pi-args.h>
# include <libpisock/pi-appinfo.h>
# include <libpisock/pi-address.h>
+# include <libpisock/pi-version.h>
#else
# include <pi-args.h>
# include <pi-appinfo.h>
# include <pi-address.h>
+# include <pi-version.h>
#endif
#include "mgutils.h"
@@ -1009,10 +1011,22 @@ static void jpilot_load_address( JPilotFile *pilotFile, buf_rec *buf, ItemFolder
struct AddressAppInfo *ai;
gchar **firstName = NULL;
gchar **lastName = NULL;
+#if (PILOT_LINK_MAJOR > 11)
+ pi_buffer_t *RecordBuffer;
+#endif /* PILOT_LINK_0_12 */
/* Retrieve address */
+#if (PILOT_LINK_MAJOR < 12)
num = unpack_Address( & addr, buf->buf, buf->size );
if( num > 0 ) {
+#else /* PILOT_LINK_0_12 */
+ RecordBuffer = pi_buffer_new(buf->size);
+ memcpy(RecordBuffer->data, buf->buf, buf->size);
+ RecordBuffer->used = buf->size;
+ num = unpack_Address( & addr, RecordBuffer, address_v1 );
+ pi_buffer_free(RecordBuffer);
+ if (num != -1) {
+#endif
addrEnt = addr.entry;
attrib = buf->attrib;
unique_id = buf->unique_id;