Hello community,
here is the log from the commit of package libopensync-plugin-synce
checked in at Fri Jul 7 04:06:19 CEST 2006.
--------
--- arch/i386/libopensync-plugin-synce/libopensync-plugin-synce.changes 2006-01-25 21:44:26.000000000 +0100
+++ libopensync-plugin-synce/libopensync-plugin-synce.changes 2006-07-06 14:48:56.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Jul 6 14:17:01 CEST 2006 - dgollub@suse.de
+
+- update to version 0.18_SVN1095:
+ o fixed to build for current libopensync
+ o fixed crashes and memory leaks
+
+-------------------------------------------------------------------
Old:
----
libopensync-plugin-synce-0.18_SVN770.tar.bz2
New:
----
libopensync-plugin-synce-0.18_SVN1095.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libopensync-plugin-synce.spec ++++++
--- /var/tmp/diff_new_pack.R5kNje/_old 2006-07-07 04:05:10.000000000 +0200
+++ /var/tmp/diff_new_pack.R5kNje/_new 2006-07-07 04:05:10.000000000 +0200
@@ -1,11 +1,11 @@
#
-# spec file for package libopensync-plugin-synce (Version 0.18_SVN770)
+# spec file for package libopensync-plugin-synce (Version 0.18_SVN1095)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
@@ -13,7 +13,7 @@
Name: libopensync-plugin-synce
BuildRequires: libopensync-devel synce-devel
URL: http://www.openync.org
-Version: 0.18_SVN770
+Version: 0.18_SVN1095
Release: 1
Summary: Synce OpenSync Plugin for PocketPC and WindowsCE based handhelds.
License: GPL
@@ -37,10 +37,9 @@
%prep
%setup -q
-%{?suse_update_config:%{suse_update_config -f . }}
-autoreconf -sfi
%build
+autoreconf -sfi
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%_prefix --libdir=%_libdir --localstatedir=%_localstatedir
make
@@ -52,11 +51,9 @@
%clean
rm -rf $RPM_BUILD_ROOT
-%post
-%run_ldconfig
+%post -p /sbin/ldconfig
-%postun
-%run_ldconfig
+%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
@@ -65,6 +62,10 @@
%doc AUTHORS COPYING INSTALL ChangeLog README
%changelog -n libopensync-plugin-synce
+* Thu Jul 06 2006 - dgollub@suse.de
+- update to version 0.18_SVN1095:
+ o fixed to build for current libopensync
+ o fixed crashes and memory leaks
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Dec 12 2005 - dgollub@suse.de
++++++ libopensync-plugin-synce-0.18_SVN770.tar.bz2 -> libopensync-plugin-synce-0.18_SVN1095.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-synce-0.18_SVN770/configure.in new/libopensync-plugin-synce-0.18_SVN1095/configure.in
--- old/libopensync-plugin-synce-0.18_SVN770/configure.in 2005-10-14 09:06:50.000000000 +0200
+++ new/libopensync-plugin-synce-0.18_SVN1095/configure.in 2006-04-29 22:13:39.000000000 +0200
@@ -12,6 +12,9 @@
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
+dnl AM_PATH_RRA forgets to add mimedir to the list of dependicies.
+dnl Fix it here.
+LIBS="-lmimedir $LIBS"
AM_PATH_RRA
AM_PATH_LIBSYNCE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-synce-0.18_SVN770/src/synce-plugin new/libopensync-plugin-synce-0.18_SVN1095/src/synce-plugin
--- old/libopensync-plugin-synce-0.18_SVN770/src/synce-plugin 2005-09-07 19:46:28.000000000 +0200
+++ new/libopensync-plugin-synce-0.18_SVN1095/src/synce-plugin 2006-04-29 22:13:39.000000000 +0200
@@ -2,5 +2,5 @@
<contact></contact>
<todos></todos>
<calendar></calendar>
- <files></files>
+ <file>/My Documents/</file>
</config>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-synce-0.18_SVN770/src/synce_file.c new/libopensync-plugin-synce-0.18_SVN1095/src/synce_file.c
--- old/libopensync-plugin-synce-0.18_SVN770/src/synce_file.c 2005-10-12 23:25:22.000000000 +0200
+++ new/libopensync-plugin-synce-0.18_SVN1095/src/synce_file.c 2006-04-29 22:13:39.000000000 +0200
@@ -1,5 +1,5 @@
/*
- * file-sync - A plugin for the opensync framework
+ * @file file-sync - A plugin for the opensync framework
*
* Copyright © 2005 Danny Backx
*
@@ -44,14 +44,15 @@
#include
#include "synce_plugin.h"
-static time_t DOSFS_FileTimeToUnixTime(const FILETIME *filetime, DWORD *remainder);
+static time_t DOSFS_FileTimeToUnixTime(const FILETIME *filetime,
+ DWORD *remainder);
/*
- * Do this by ourselves.
- * The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals
- * since January 1, 1601, 0:00. 'remainder' is the nonnegative number of 100-ns intervals
- * corresponding to the time fraction smaller than 1 second that couldn't be stored in the
- * time_t value.
+ * Do this by ourselves. The FILETIME structure is a 64-bit value
+ * representing the number of 100-nanosecond intervals since January
+ * 1, 1601, 0:00. 'remainder' is the nonnegative number of 100-ns
+ * intervals corresponding to the time fraction smaller than 1 second
+ * that couldn't be stored in the time_t value.
*/
static time_t CeTimeToUnixTime(FILETIME t)
{
@@ -60,31 +61,19 @@
return DOSFS_FileTimeToUnixTime(&t, &r);
}
-/*
- * A hash appears to be a string.
- * The file-sync plugin allocates new memory in this occasion so I guess that's the right
- * thing to do.
- */
-static char *FileHash(fileFormat *p)
-{
- if (p)
- return g_strdup_printf("%ld-%d", p->last_mod, p->size);
- return NULL;
-}
-
-/*
- * In this pass of set_data(), do not pass real file contents, but only pass the file name
- * to the opensync engine in the fileFormat structure's data field.
- * See also the comments for synceFileGetData().
+/** Report to opensync library information about given file: its uid
+ (path with the root directory stripped), format (file) and hash
+ (currently modification date and size). For performance reasons,
+ no file content is passed at this stage. opensync library will
+ fetch it later if needed.
*/
-static osync_bool FilesReportFileChange(OSyncContext *ctx, const char *dir,
+static osync_bool
+report_file_change(OSyncContext *ctx, const char *dir,
CE_FIND_DATA *entry, OSyncError **error)
{
SyncePluginPtr *env;
- OSyncChange *change;
char path[MAX_PATH], *hash, *lpath;
WCHAR *wfn;
- HANDLE h;
fileFormat *ff;
time_t t1, t2;
@@ -92,14 +81,7 @@
snprintf(path, MAX_PATH, "%s\\%s", dir, lpath);
wfn = wstr_from_current(path);
- fprintf(stderr, "FilesReportFileChange(%s)\n", path);
-
- ff = osync_try_malloc0(sizeof(fileFormat), error);
- if (!ff) {
- osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
- return FALSE;
- }
-
+ ff = g_malloc0(sizeof(fileFormat));
ff->userid = 0;
ff->groupid = 0;
ff->mode = 0777; /* Fake */
@@ -114,40 +96,28 @@
t2 = CeTimeToUnixTime(entry->ftCreationTime);
ff->last_mod = (t1 < t2) ? t2 : t1;
- /* Assemble a structure with data about this file */
- h = CeCreateFile(wfn, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (h == 0) {
- /* ?? FIX ME */
- free((void *)ff);
- return FALSE;
- }
- ff->size = CeGetFileSize(h, NULL);
- CeCloseHandle(h);
-
- /* Set the hash */
- hash = FileHash(ff);
-
- ff->data = strdup(path);
-
if (ctx) {
int l;
-
+ HANDLE h;
+ unsigned size;
env = (SyncePluginPtr *)osync_context_get_plugin_data(ctx);
- change = osync_change_new();
-
- l = strlen(env->config_file) + 1; /* One is the backslash */
-
+ OSyncChange *change = osync_change_new();
osync_change_set_member(change, env->member);
- /*
- * Pass the full file name as UID, but leave off the directory in which
- * the sync is rooted (and the backslash, see above).
- */
+ /* One is the separating backslash as appended above with snprintf() */
+ l = strlen(env->config_file) + 1;
osync_change_set_uid(change, path + l);
- osync_change_set_objformat_string(change, "file"); /* Copied from file-sync */
-
- /* Should do the file handling here, but it was moved up for debugging */
-
+ osync_change_set_objformat_string(change, "file");
+ /* Get file size needed for hash */
+ h = CeCreateFile(wfn, GENERIC_READ, 0, NULL, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, 0);
+ if (h) {
+ size = CeGetFileSize(h, NULL);
+ CeCloseHandle(h);
+ } else size = 0;
+ hash = g_strdup_printf("%ld-%u", ff->last_mod, size);
osync_change_set_hash(change, hash);
+ fprintf(stderr, "%s(%s) hash %s\n", __func__, path, hash);
+ g_free(hash);
/*
* Pass the structure to OpenSync
* The final parameter is FALSE to indicate a get_data() call will fetch
@@ -156,13 +126,9 @@
osync_change_set_data(change, (char *)ff, sizeof(fileFormat), FALSE);
if (osync_hashtable_detect_change(env->hashtable, change)) {
-#if 0
- osync_change_set_changetype(change, CHANGE_ADDED); /* ?? */
-#endif
osync_context_report_change(ctx, change);
osync_hashtable_update_hash(env->hashtable, change);
}
- g_free(hash);
}
wstr_free_string(wfn);
@@ -170,7 +136,9 @@
return TRUE;
}
-osync_bool FilesFindAllFromDirectory(OSyncContext *ctx, const char *dir, OSyncError **error)
+static osync_bool
+FilesFindAllFromDirectory(OSyncContext *ctx, const char *dir,
+ OSyncError **error)
{
WCHAR *wd;
CE_FIND_DATA *find_data = NULL;
@@ -180,12 +148,14 @@
if (! dir)
return TRUE;
+ fprintf(stderr, "%s(%s)\n", __func__, dir);
snprintf(path, MAX_PATH, "%s\\*", dir);
wd = wstr_from_current(path);
- if (CeFindAllFiles(wd, FAF_ATTRIBUTES|FAF_LASTWRITE_TIME|FAF_NAME|FAF_SIZE_LOW,
- &file_count, &find_data)) {
- for (i=0; idwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
snprintf(path, MAX_PATH, "%s\\%s",
dir, wstr_to_current(entry->cFileName));
if (! FilesFindAllFromDirectory(ctx, path, error)) {
/* Failure, pass on the word */
+ wstr_free_string(wd);
return FALSE;
}
}
@@ -217,48 +188,62 @@
return TRUE;
}
-/*
- * This function gets the command for the SynCE plugin to add, modify or delete a file.
+static gchar*
+get_complete_file_name(const char *config_prefix, const char *rest)
+{
+ char *s, *lfn;
+
+ /* Concatenate our root and the local file name */
+ lfn = g_strdup_printf("%s\\%s", config_prefix, rest);
+
+ /* Translate slashes into backslashes */
+ for (s=lfn; *s; s++)
+ if (*s == '/')
+ *s = '\\';
+
+ /* fprintf(stderr, "Full fn(%s)\n", lfn); */
+ return lfn;
+}
+/**
+ * This function gets the command for the SynCE plugin to add, modify
+ * or delete a file.
*
* Reply to the OpenSync framework with
* osync_context_report_success(ctx);
*
*/
-extern osync_bool synceFileCommit(OSyncContext *ctx, OSyncChange *change)
+osync_bool
+synce_file_commit(OSyncContext *ctx, OSyncChange *change)
{
SyncePluginPtr *env = (SyncePluginPtr *)osync_context_get_plugin_data(ctx);
HANDLE h;
fileFormat *ff;
WCHAR *wfn;
DWORD wr, e, opt;
- char *p, *s, *fn, *str, *lfn;
+ char *p, *s, *fn, *lfn, *str;
OSyncChangeType ct;
osync_debug("SYNCE-SYNC", 4, "start: %s", __func__);
+ if(!env->config_file) {
+ osync_context_report_error(ctx, 1,
+ "<file> parameter not set");
+ return FALSE;
+ }
ff = (fileFormat *)osync_change_get_data(change);
fn = (char *)osync_change_get_uid(change);
ct = osync_change_get_changetype(change);
-
- /* Concatenate our root and the local file name */
- lfn = g_strdup_printf("%s\\%s", env->config_file, fn);
-
- /* Translate slashes into backslashes */
- for (s=lfn; *s; s++)
- if (*s == '/')
- *s = '\\';
-
- /* Convert file name into WIDE format for WinCE - this must be the complete file name */
- fprintf(stderr, "Wide fn(%s)\n", lfn);
+ lfn = get_complete_file_name(env->config_file, fn);
wfn = wstr_from_current(lfn);
switch (ct) {
case CHANGE_DELETED:
- fprintf(stderr, "%s: DELETED %s\n", __func__, osync_change_get_uid(change));
+ fprintf(stderr, "%s: DELETED %s\n", __func__,
+ osync_change_get_uid(change));
if (ff == NULL) {
/* Something went wrong, e.g. the file isn't there. */
wstr_free_string(wfn);
- free(lfn);
+ g_free(lfn);
/* FIX ME is this a valid return value for this case ? */
return TRUE;
}
@@ -269,13 +254,12 @@
osync_context_report_error(ctx, 1,
"CeDeleteFile(%s) : %s", fn, s);
wstr_free_string(wfn);
- free(lfn);
+ g_free(lfn);
return FALSE;
}
} else if (S_ISDIR(ff->mode)) { /* Directory */
/* Removing directories... should we do this ? */
}
- wstr_free_string(wfn);
break;
case CHANGE_ADDED:
case CHANGE_MODIFIED:
@@ -301,7 +285,7 @@
lfn, s);
wstr_free_string(w);
wstr_free_string(wfn);
- free(lfn);
+ g_free(lfn);
return FALSE;
}
if (cnt == 0) {
@@ -346,7 +330,8 @@
*/
opt = TRUNCATE_EXISTING;
}
- fprintf(stderr, "%s: %s %s\n", __func__, str, osync_change_get_uid(change));
+ fprintf(stderr, "%s: %s %s\n", __func__, str,
+ osync_change_get_uid(change));
if (S_ISDIR(ff->mode)) { /* Directory */
/* FIX ME */
@@ -356,7 +341,7 @@
osync_context_report_error(ctx, 1,
"CeCreateDirectory(%s) : %s", fn, s);
wstr_free_string(wfn);
- free(lfn);
+ g_free(lfn);
return FALSE;
}
} else if (S_ISREG(ff->mode)) { /* Regular file */
@@ -368,7 +353,7 @@
osync_context_report_error(ctx, 1,
"CeCreateFile(%s) : %s", fn, s);
wstr_free_string(wfn);
- free(lfn);
+ g_free(lfn);
return FALSE;
}
@@ -383,7 +368,7 @@
lfn, ff->size, s);
CeCloseHandle(h);
wstr_free_string(wfn);
- free(lfn);
+ g_free(lfn);
return FALSE;
}
CeCloseHandle(h);
@@ -392,32 +377,33 @@
/*
* All done
*/
- wstr_free_string(wfn);
break;
default:
osync_debug("SYNCE-SYNC", 4, "Unknown change type");
fprintf(stderr, "%s: ?? %s\n", __func__, osync_change_get_uid(change));
- wstr_free_string(wfn);
}
/* Answer the call */
osync_context_report_success(ctx);
osync_hashtable_update_hash(env->hashtable, change);
- free(lfn);
+ wstr_free_string(wfn);
+ g_free(lfn);
return TRUE;
}
/*
* File get_changeinfo : report the changes to the OpenSync engine.
*/
-extern osync_bool synceFileGetChangeInfo(OSyncContext *ctx, OSyncError **error)
+osync_bool
+synce_file_get_changeinfo(OSyncContext *ctx, OSyncError **error)
{
SyncePluginPtr *env = (SyncePluginPtr *)osync_context_get_plugin_data(ctx);
osync_debug("SYNCE-SYNC", 4, "start: %s", __func__);
- /* Detect whether we need to do a slow sync - this is supported by the hash table */
+ /* Detect whether we need to do a slow sync - this is supported by
+ the hash table */
if (osync_member_get_slow_sync(env->member, "data"))
osync_hashtable_set_slow_sync(env->hashtable, "data");
@@ -433,26 +419,27 @@
/*
* We're supporting sync of exactly one directory.
*/
- if (env->config_file && ! FilesFindAllFromDirectory(ctx, env->config_file, error)) {
+ if (env->config_file &&
+ ! FilesFindAllFromDirectory(ctx, env->config_file, error)) {
osync_context_report_error(ctx, 1, "Error while checking for files");
return FALSE;
}
osync_hashtable_report_deleted(env->hashtable, ctx, "data");
- /* Don't report via
- * osync_context_report_success(ctx)
- * here, our caller will already be doing that.
+ /* Don't report via osync_context_report_success(ctx) here, our
+ * caller will already be doing that.
*/
return TRUE;
}
/*
- * FIX ME
- * This function is known to sometimes fail, it sometimes gets called with all zeroes in the
- * structure pointed to by ff.
+ * FIX ME. This function is known to sometimes fail, it sometimes gets
+ * called with all zeroes in the structure pointed to by ff.
+ * NOTE: pawsa never saw this problem.
*/
-extern void synceFileGetData(OSyncContext *ctx, OSyncChange *change)
+void
+synce_file_getdata(OSyncContext *ctx, OSyncChange *change)
{
SyncePluginPtr *env;
fileFormat *ff;
@@ -460,6 +447,8 @@
size_t rsz;
WCHAR *wfn;
int r;
+ char *lfn;
+ const char *fname;
osync_debug("SynCE-File", 4, "start : %s", __func__);
env = (SyncePluginPtr *)osync_context_get_plugin_data(ctx);
@@ -467,7 +456,8 @@
#if 0
if (ff == NULL || ff->data == NULL || ff->size == 0) {
- osync_debug("SynCE-File", 4, "%s: NULL values encountered, returning\n", __func__);
+ osync_debug("SynCE-File", 4,
+ "%s: NULL values encountered, returning\n", __func__);
osync_context_report_error(ctx, 1, "get_data got NULLs");
return;
}
@@ -480,35 +470,38 @@
osync_context_report_success(ctx);
return;
}
- /*
- * There appears to be a trick being used here.
- *
- * First report some stuff, use the data field to pass random data (e.g. the file
- * name) to ourselves.
- * Then, in the get_data() call, read that data and replace it with the file content.
- */
- if (ff->data == NULL) {
- osync_context_report_error(ctx, 4, "%s: NULL values", __func__);
- return;
- }
-
- wfn = wstr_from_current(ff->data);
-
+ fname = osync_change_get_uid(change);
+ lfn = get_complete_file_name(env->config_file, fname);
+ wfn = wstr_from_current(lfn);
/* Read the file through SynCE */
- h = CeCreateFile(wfn, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ h = CeCreateFile(wfn, GENERIC_READ, 0, NULL, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, 0);
- free(ff->data);
- ff->data = malloc(ff->size);
-
- r = CeReadFile(h, ff->data, ff->size, &rsz, NULL);
- if (r == 0) {
- /* Error */
- DWORD e = CeGetLastError();
- char *s = synce_strerror(e);
- osync_context_report_error(ctx, 1, "Error from CeReadFile (%s)", s);
- CeCloseHandle(h);
- return;
- }
+ ff->size = CeGetFileSize(h, NULL);
+ if(ff->size == 0xFFFFFFFF) {
+ DWORD e = CeGetLastError();
+ const char *s = synce_strerror(e);
+ osync_context_report_error(ctx, 4,
+ "\n%s: could not find out file size (%u): %s\n",
+ __func__, (unsigned)e, s);
+ CeCloseHandle(h);
+ g_free(lfn);
+ wstr_free_string(wfn);
+ return;
+ }
+ ff->data = g_malloc(ff->size);
+ if(ff->size>0) {
+ r = CeReadFile(h, ff->data, ff->size, &rsz, NULL);
+ if (r == 0) {
+ /* Error */
+ DWORD e = CeGetLastError();
+ char *s = synce_strerror(e);
+ osync_context_report_error(ctx, 1, "Error from CeReadFile (%d:%s)",
+ e, s);
+ CeCloseHandle(h);
+ return;
+ }
+ }
/* Send its contents */
osync_change_set_data(change, (char *)ff, sizeof(ff), TRUE);
@@ -522,7 +515,8 @@
/* See if we can pass a list of directories found on the device.
* Handle directory name concatenation with care.
*/
-GList *ListAllDirectories(GList *list, char *dir, int recurse)
+GList*
+ListAllDirectories(GList *list, char *dir, int recurse)
{
WCHAR *wd;
CE_FIND_DATA *find_data = NULL;
@@ -531,7 +525,8 @@
char path[MAX_PATH];
osync_bool isroot;
- /* Detect root directory as special case, the only one with tailing backslash */
+ /* Detect root directory as special case, the only one with tailing
+ backslash */
isroot = (dir[0] == '\\' && dir[1] == '\0');
if (isroot)
strcpy(path, "\\*");
@@ -582,11 +577,14 @@
* it gives it a list of interesting directories on the PDA,
* which the user might like to choose from to synchronize.
*
- * Do not make this function static, as the confuration GUI needs to be able to locate
- * it using dlsym(); also don't change its name or signature without making the
- * corresponding change in the configuration program.
- */
-GList * synce_list_directories(SyncePluginPtr *env, const char *basedir, OSyncError **error)
+ * Do not make this function static, as the confuration GUI needs to
+ * be able to locate it using dlsym(); also don't change its name or
+ * signature without making the corresponding change in the
+ * configuration program.
+ */
+GList*
+synce_list_directories(SyncePluginPtr *env, const char *basedir,
+ OSyncError **error)
{
HRESULT hr;
GList *ret = NULL;
@@ -610,9 +608,10 @@
}
#endif
/*
- * List all the directories starting with root, this appears to be a much better solution
- * The final parameter is whether to recurse (0 only lists the top level dirs on the
- * device, 1 will list all directories).
+ * List all the directories starting with root, this appears
+ * to be a much better solution The final parameter is whether
+ * to recurse (0 only lists the top level dirs on the device,
+ * 1 will list all directories).
*/
ret = ListAllDirectories(ret, "\\", 1);
@@ -652,7 +651,8 @@
if (*s == '/')
*s = '\\';
- /* Convert file name into WIDE format for WinCE - this must be the complete file name */
+ /* Convert file name into WIDE format for WinCE - this must be the
+ complete file name */
fprintf(stderr, "Wide fn(%s)\n", lfn);
wfn = wstr_from_current(lfn);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-synce-0.18_SVN770/src/synce_file.h new/libopensync-plugin-synce-0.18_SVN1095/src/synce_file.h
--- old/libopensync-plugin-synce-0.18_SVN770/src/synce_file.h 2005-09-14 00:04:06.000000000 +0200
+++ new/libopensync-plugin-synce-0.18_SVN1095/src/synce_file.h 2006-04-29 22:13:39.000000000 +0200
@@ -17,11 +17,11 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-extern osync_bool synceFileCommit(OSyncContext *ctx, OSyncChange *change);
-extern osync_bool synceFileGetChangeInfo(OSyncContext *ctx);
extern void file_connect(OSyncContext *ctx);
extern bool file_callback (RRA_SyncMgrTypeEvent event, uint32_t type, uint32_t count, uint32_t* ids, void* cookie);
-extern void synceFileGetData(OSyncContext *ctx, OSyncChange *change);
+extern osync_bool synce_file_get_changeinfo(OSyncContext *ctx);
+extern void synce_file_getdata(OSyncContext *ctx, OSyncChange *change);
+extern osync_bool synce_file_commit(OSyncContext *ctx, OSyncChange *change);
extern void file_read(OSyncContext *ctx, OSyncChange *change);
extern osync_bool file_access(OSyncContext *ctx, OSyncChange *change);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libopensync-plugin-synce-0.18_SVN770/src/synce_plugin.c new/libopensync-plugin-synce-0.18_SVN1095/src/synce_plugin.c
--- old/libopensync-plugin-synce-0.18_SVN770/src/synce_plugin.c 2005-11-29 15:19:13.000000000 +0100
+++ new/libopensync-plugin-synce-0.18_SVN1095/src/synce_plugin.c 2006-04-29 22:13:39.000000000 +0200
@@ -605,7 +605,7 @@
if (env->config_file) {
osync_debug("SynCE-SYNC", 4, "checking files to synchronize");
- if (! synceFileGetChangeInfo(ctx)) {
+ if (! synce_file_get_changeinfo(ctx)) {
osync_context_report_error(ctx, 1, "Error while checking files");
return;
}
@@ -982,7 +982,7 @@
info->functions.disconnect = disconnect;
info->functions.finalize = finalize;
info->functions.get_changeinfo = get_changeinfo;
- info->functions.get_data = synceFileGetData;
+ info->functions.get_data = synce_file_getdata;
info->timeouts.connect_timeout = 5;
@@ -1000,5 +1000,6 @@
osync_plugin_accept_objtype(info, "data");
osync_plugin_accept_objformat(info, "data", "file", NULL);
- osync_plugin_set_commit_objformat(info, "data", "file", synceFileCommit);
+ osync_plugin_set_commit_objformat(info, "data", "file",
+ synce_file_commit);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org