[commit] isync/src

2006-01-24 Thread Oswald Buddenhagen
CVS commit by ossi: #include limits.h (for INT_MAX) REF: <[EMAIL PROTECTED]> M +1 -0 drv_imap.c 1.12 --- isync/src/drv_imap.c #1.11:1.12 @@ -32,4 +32,5 @@ #include #include +#include #include #include --- This SF.net e

Re: problem with imap CREATE

2006-01-25 Thread Oswald Buddenhagen
On Wed, Jan 25, 2006 at 02:27:24PM +0100, Antoine Reilles wrote: > $ mbsync -Cm boxes > if you add -V to the command line and ensure that you don't wrap the posted log, it will be perfect. :) > Another problem i have with mbsync is that i can't easily synchronize a > hierarchy of boxes (for insta

Re: problem with imap CREATE

2006-01-25 Thread Oswald Buddenhagen
On Wed, Jan 25, 2006 at 03:57:58PM +0100, Antoine Reilles wrote: > IMAP command 'CREATE ""netbsd/people/minskim""' returned an error: BAD > Missing or invalid argument to CREATE > ah, yes, that one ... it was a misguided attempt to fix something that was actually correct. :} it's fixed in cvs for

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: move driver options composition below journal replay - it might make additional actions necessary (it doesn't, yet). M +36 -35sync.c 1.53 --- isync/src/sync.c #1.52:1.53 @@ -197,38 +197,4 @@ sync_boxes( store_t *ctx[], const char * recs = 0, srecadd = &rec

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: split driver->prepare into ->prepare_opts and ->prepare_paths M +8 -2 drv_imap.c 1.13 M +8 -2 drv_maildir.c 1.9 M +2 -1 isync.h 1.45 M +2 -1 sync.c 1.52 --- isync/src/drv_imap.c #1.12:1.13 @@ -1399,8 +1399,13 @@ imap_open_store( store_c

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: M_NOT_SYNCED => M_SYNCED. now that sync records know their messages, it is simpler to track the positive case. M +1 -1 isync.h 1.46 M +11 -14sync.c 1.54 --- isync/src/isync.h #1.45:1.46 @@ -120,5 +120,5 @@ typedef struct group_conf { #define M_FLAGS

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: merge Quiet, Verbose & Debug into DFlags M +3 -3 drv_imap.c 1.14 M +6 -1 isync.h 1.47 M +16 -18main.c 1.50 M +1 -1 sync.c 1.55 M +5 -5 util.c 1.5 --- isync/src/drv_imap.c #1.13:1.14 @@ -399,5 +399,5 @@ buffer_gets( buffer_t * b,

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: undocumented flag -J to skip committing the new sync state. M +1 -0 isync.h 1.48 M +3 -0 main.c 1.51 M +5 -3 sync.c 1.56 --- isync/src/sync.c #1.55:1.56 @@ -915,7 +915,9 @@ sync_boxes( store_t *ctx[], const char * fclose( nfp );

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: test for journalling and journal replay. M +24 -1 run-tests.pl 1.14 --- isync/src/run-tests.pl #1.13:1.14 @@ -260,8 +260,31 @@ ".shift(); close FILE; - open FILE, "../mbsync -D -c .mbsyncrc test 2>&1 |"; + open FILE, "../mbsync -D -J -c .mbsyn

[commit] isync/src

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: move fetching new messages in front of syncing old entries. this alone does not buy us a whole lot ... M +58 -56sync.c 1.57 --- isync/src/sync.c #1.56:1.57 @@ -181,5 +181,5 @@ sync_boxes( store_t *ctx[], const char * driver_t *driver[2]; message_t

[commit] isync/src/compat

2006-01-29 Thread Oswald Buddenhagen
CVS commit by ossi: whoops - 'isync -w' would write .mbsyncrc to a wrong directory M +2 -2 main.c 1.6 --- isync/src/compat/main.c #1.5:1.6 @@ -332,6 +332,6 @@ main( int argc, char **argv ) if (*de->d_name == '.')

[commit] isync/src

2006-01-30 Thread Oswald Buddenhagen
CVS commit by ossi: declaring ex[M] instead of ex[2] is, indeed, no good. long live watchpoints. M +1 -1 sync.c 1.58 --- isync/src/sync.c #1.57:1.58 @@ -185,5 +185,5 @@ sync_boxes( store_t *ctx[], const char * FILE *dfp, *jfp, *nfp; int opts[2]; - int nom, nos,

[commit] isync/src

2006-01-30 Thread Oswald Buddenhagen
CVS commit by ossi: establish bi-directional mapping between mails and sync records. use it to merge the --renew case into the --new case. M +1 -1 isync.h 1.49 M +53 -66sync.c 1.59 --- isync/src/isync.h #1.48:1.49 @@ -119,5 +119,4 @@ typedef struct group_conf { #define M_DE

[commit] isync/src

2006-01-30 Thread Oswald Buddenhagen
CVS commit by ossi: now that messages know their sync records, M_SYNCES is superfluous. M +0 -1 isync.h 1.50 M +3 -6 sync.c 1.60 --- isync/src/isync.h #1.49:1.50 @@ -119,5 +119,4 @@ typedef struct group_conf { #define M_DEAD (1<<1) /* expunged */ #define M_FLAGS

[commit] isync/src

2006-01-30 Thread Oswald Buddenhagen
CVS commit by ossi: remove superfluous temporary rflags from sync_boxes M +2 -3 sync.c 1.61 --- isync/src/sync.c #1.60:1.61 @@ -670,5 +670,5 @@ sync_boxes( store_t *ctx[], const char * for (t = 0; t < 2; t++) { int unex; -

[commit] isync/src

2006-01-30 Thread Oswald Buddenhagen
CVS commit by ossi: sanitize S_DEL M +9 -4 sync.c 1.62 --- isync/src/sync.c #1.61:1.62 @@ -666,4 +666,8 @@ sync_boxes( store_t *ctx[], const char * del[M] = nom && (srec->uid[M] > 0); del[S] = nos && (srec->uid[S] > 0); +

[commit] isync/src

2006-01-30 Thread Oswald Buddenhagen
CVS commit by ossi: M_EXPIRED -> M_EXPIRE M +1 -1 isync.h 1.51 M +2 -2 sync.c 1.63 --- isync/src/isync.h #1.50:1.51 @@ -119,5 +119,5 @@ typedef struct group_conf { #define M_DEAD (1<<1) /* expunged */ #define M_FLAGS(1<<2) /* flags fetched */ -#define M_EX

[commit] isync

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: deal with branches in "make log" M +2 -1 Makefile.am 1.28 --- isync/Makefile.am #1.27:1.28 @@ -5,5 +5,6 @@ log: @perl -p -e "s/^(\\S+)\\s+(\\S.+\\S)\\s+(\\S+)\\s*\$$/\$$1:'\$$2 <\$$3>'\\n/" < ../CVSROOT/accounts > .usermap - cvs2cl -U .usermap --n

[commit] isync_1_0_branch: isync/src

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: backport: flush debug output M +1 -0 util.c 1.3.2.1 --- isync/src/util.c #1.3:1.3.2.1 @@ -42,4 +42,5 @@ debug( const char *msg, ... ) vprintf( msg, va ); va_end( va ); + fflush( stdout ); } }

[commit] isync_1_0_branch: isync/src

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: backport: - sanitize flag handling of expired messages - don't record we synced flags if we didn't - remove now superfluous temporary rflags M +8 -10 sync.c 1.43.2.1 --- isync/src/sync.c #1.43:1.43.2.1 @@ -252,5 +252,5 @@ sync_old( int tops, store_t *sctx, store

[commit] isync_1_0_branch: isync

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: backport: compile fixes M +1 -0 configure.in 1.34.2.1 M +4 -0 src/drv_imap.c 1.10.2.1 --- isync/configure.in #1.34:1.34.2.1 @@ -10,4 +10,5 @@ fi +AC_CHECK_HEADERS([sys/filio.h]) AC_CHECK_FUNCS(vasprintf) --- isync/src/drv_imap.c #1.10:1.10.2.1 @@

[commit] isync_1_0_branch: isync/src

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: backport: less confusing uid ranges in debug M +2 -2 sync.c 1.43.2.2 --- isync/src/sync.c #1.43.2.1:1.43.2.2 @@ -698,5 +698,5 @@ sync_boxes( store_t *mctx, const char *m maxwuid = 0; info( "Selecting slave %s... ", sname ); - debug(

[commit] isync_1_0_branch: isync/src/compat

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: backport: fix 'isync -w' writing .mbsyncrc to a wrong directory M +2 -2 main.c 1.5.2.1 --- isync/src/compat/main.c #1.5:1.5.2.1 @@ -332,6 +332,6 @@ main( int argc, char **argv ) if (*de->d_name == '.')

[commit] isync_1_0_branch: isync

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: backport: deal with branches in "make log" M +2 -1 Makefile.am 1.27.2.1 --- isync/Makefile.am #1.27:1.27.2.1 @@ -5,5 +5,6 @@ log: @perl -p -e "s/^(\\S+)\\s+(\\S.+\\S)\\s+(\\S+)\\s*\$$/\$$1:'\$$2 <\$$3>'\\n/" < ../CVSROOT/accounts > .usermap - cvs2

[commit] isync_1_0_branch: isync

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: bump version M +1 -1 configure.in 1.34.2.2 --- isync/configure.in #1.34.2.1:1.34.2.2 @@ -1,5 +1,5 @@ AC_INIT(src/isync.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(isync, 1.0.1) +AM_INIT_AUTOMAKE(isync, 1.0.2) AM_MAINTAINER_MODE --

isync 1.0.2 release

2006-01-31 Thread Oswald Buddenhagen
hi everybody! (yes, all 7 of you plus those who read via mail-archive.com or gmane :) i'm planning to make a 1.0.2 release in a few days. it is - surprise surprise - a bugfix release. so check out the isync_1_0_branch and give it some hammering! in particular, i expect a "compatibility test passed

[commit] isync_1_0_branch: isync

2006-01-31 Thread Oswald Buddenhagen
CVS commit by ossi: regen M +96 -26ChangeLog 1.23.2.1 --- isync/ChangeLog #1.23:1.23.2.1 @@ -1,2 +1,98 @@ +2006-01-31 16:45 Oswald Buddenhagen <[EMAIL PROTECTED]> + + * configure.in: + + bump version + +2006-01-31 16:21 Oswald Buddenhagen <[EMAIL

[commit] www

2006-02-01 Thread Oswald Buddenhagen
CVS commit by ossi: mention moderation of non-subscribers M +3 -2 index.html 1.12 --- www/index.html #1.11:1.12 @@ -105,10 +105,11 @@ -Feedback to mailto:isync-devel@lists.sourceforge.net";>isync-devel@lists.sourceforge.net +Feedback to mailto:isync-devel@lists.sourceforge.net";

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: orphan/kill all affected entries after expunge M +1 -1 run-tests.pl 1.15 M +10 -11sync.c 1.64 --- isync/src/run-tests.pl #1.14:1.15 @@ -54,5 +54,5 @@ 1, 1, "F", 2, 2, "F", 3, 3, "FS", 4, 4, "", 9, 10, "", 10, 9, "" ], [ 9, 0, 9, - 1, 1, "F", 2, 2,

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: much improved journal replay testing. some clenup. M +111 -66 run-tests.pl 1.16 --- isync/src/run-tests.pl #1.15:1.16 @@ -225,9 +225,4 @@ -sub fcfg(@) -{ - return join(" // ", map({ my $t = $_; chomp $t; $t =~ s/\n/ \/ /g; $t; } @_)); -} - sub qm($) { @

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: make the sync entry search in the journal replay wrap around at the end of the list. the "always forward" assumption is violated in some cases. M +70 -75sync.c 1.65 --- isync/src/sync.c #1.64:1.65 @@ -310,6 +310,6 @@ sync_boxes( store_t *ctx[], const char *

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: versioned journal. the commands and their meanings change all the time, so better handle that case. ps: yes, i think not upgrading mbsync between interrupting and resuming a run is a reasonable requirement. M +25 -7 sync.c 1.66 --- isync/src/sync.c #1.65:1.66 @@ -

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: cosmetics: move around variable declarations and remove obsolete comment M +1 -6 sync.c 1.67 --- isync/src/sync.c #1.66:1.67 @@ -189,5 +189,5 @@ sync_boxes( store_t *ctx[], const char * int nom, nos, del[2], ex[2]; int muidval, suidval, smaxxuid,

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: less cluttered debug output M +11 -6 sync.c 1.68 --- isync/src/sync.c #1.67:1.68 @@ -695,9 +695,8 @@ sync_boxes( store_t *ctx[], const char * } else if (del[1-t]) { /* c.4) d.9) / b.4) d.4) */

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: crash handler that launches gdb. activated when started with -D option. simplifies debugging crashes during the reg-tests. M +37 -0 main.c 1.52 --- isync/src/main.c #1.51:1.52 @@ -27,4 +27,7 @@ #include #include +#include +#include +#include int Pid;

[commit] isync/src

2006-02-02 Thread Oswald Buddenhagen
CVS commit by ossi: major overhaul of flag change propagation and MaxMessages handling: - wrap message (un)expirations into transactions - no redundand flag propagations in conjunction with expirations - better prepared for the upcoming async operation M +0 -1 isync.h 1.52 M +139 -95

[commit] isync

2006-02-03 Thread Oswald Buddenhagen
CVS commit by ossi: wrap message storing into transactions. nice side effect: drivers don't need to deal with line end conversion any move. M +0 -7 TODO 1.20 M +30 -85src/drv_imap.c 1.15 M +39 -8 src/drv_maildir.c 1.10 M +12 -4 src/isync.h 1.53 M +268 -58 sr

[commit] isync/src

2006-02-03 Thread Oswald Buddenhagen
CVS commit by ossi: and now don't clobber the mails ... M +1 -1 sync.c 1.71 --- isync/src/sync.c #1.70:1.71 @@ -238,5 +238,5 @@ copy_msg( store_t *ctx[], int t, message if (cra || crd) for (; i < len; i++) { - c =

[commit] isync/src

2006-02-05 Thread Oswald Buddenhagen
CVS commit by ossi: include run-tests.pl in distribution M +1 -1 Makefile.am 1.3 --- isync/src/Makefile.am #1.2:1.3 @@ -14,3 +14,3 @@ man_MANS = mbsync.1 mdconvert.1 -EXTRA_DIST = mbsyncrc.sample $(man_MANS) +EXTRA_DIST = run-tests.pl mbsyncrc.sample $(man_MANS) -

[commit] isync

2006-02-05 Thread Oswald Buddenhagen
CVS commit by ossi: bump version. no, i'm not releasing yet ... :) M +1 -1 configure.in 1.36 --- isync/configure.in #1.35:1.36 @@ -1,5 +1,5 @@ AC_INIT(src/isync.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(isync, 1.0.1) +AM_INIT_AUTOMAKE(isync, 1.1.0) AM_MAINTAINER_MODE

[commit] isync/src

2006-02-05 Thread Oswald Buddenhagen
CVS commit by ossi: typos M +2 -2 mbsync.1 1.2 --- isync/src/mbsync.1 #1.1:1.2 @@ -132,5 +132,5 @@ This is useful for weeding out messages with large attachments. \fBK\fR and \fBM\fR can be appended to the size to specify KiBytes resp. -MeBytes instead of bytes. \fBB\fR is accepte

[commit] isync

2006-02-09 Thread Oswald Buddenhagen
2000-2002 Michael R. Elkins <[EMAIL PROTECTED]> - * Copyright (C) 2002-2003 Oswald Buddenhagen <[EMAIL PROTECTED]> + * Copyright (C) 2002-2006 Oswald Buddenhagen <[EMAIL PROTECTED]> * * This program is free software; you can redistribute it and/or modify @@ -24,6 +24,6 @@ *

[commit] isync/src

2006-02-11 Thread Oswald Buddenhagen
CVS commit by ossi: add copyright + license M +17 -0 run-tests.pl 1.17 --- isync/src/run-tests.pl #1.16:1.17 @@ -1,3 +1,20 @@ #! /usr/bin/perl -w +# +# Copyright (C) 2006 Oswald Buddenhagen <[EMAIL PROTECTED]> +# +# This program is free software; you can redistribute it

[commit] isync/src

2006-02-11 Thread Oswald Buddenhagen
CVS commit by ossi: unbelieveable, but close() can actually fail M +11 -2 sync.c 1.73 --- isync/src/sync.c #1.72:1.73 @@ -37,4 +37,13 @@ static const char *str_ms[] = { "master" void +Fclose( FILE *f ) +{ + if (fclose( f ) == EOF) { + perror( "cannot close file

[commit] isync/src

2006-02-11 Thread Oswald Buddenhagen
CVS commit by ossi: don't barf at directories with none of {tmp,new,cur}/ and turn them into maildirs instead. see next commit. M +11 -6 drv_maildir.c 1.12 --- isync/src/drv_maildir.c #1.11:1.12 @@ -213,5 +213,5 @@ maildir_validate( const char *prefix, co struct dirent *entry

[commit] isync/src

2006-02-11 Thread Oswald Buddenhagen
CVS commit by ossi: don't commit state file when a fatal error occurs M +5 -1 sync.c 1.74 --- isync/src/sync.c #1.73:1.74 @@ -1168,5 +1168,4 @@ sync_boxes( store_t *ctx[], const char * } - finish: Fprintf( nfp, "%d:%d %d:%d:%d\n", muidval, maxuid[M], suidval, sma

[commit] isync/src

2006-02-11 Thread Oswald Buddenhagen
CVS commit by ossi: lock the sync state open the journal before opening the master. this is a bit ugly for the "SyncState *" case, as we have to create a directory without making it a maildir right away. however, this makes the code quite a bit simpler to understand and simpler to parallelize.

[commit] isync/src

2006-02-12 Thread Oswald Buddenhagen
CVS commit by ossi: factor out box selection from sync_boxes to avoid code dupe M +37 -58sync.c 1.76 --- isync/src/sync.c #1.75:1.76 @@ -108,12 +108,35 @@ typedef struct sync_rec { static int -findmsgs( sync_rec_t *srecs, store_t *ctx[], int t, FILE *jfp ) +select_box( sync_rec_t

Re: mbsync with Cyrus imapd 2.2.8

2006-03-07 Thread Oswald Buddenhagen
On Tue, Mar 07, 2006 at 05:55:11PM +0800, Winfried Trumper wrote: > I ran into the following problems while synchronizing two cyrus-based > mailboxes: > > 1. The "pattern" is not effective, because % is used as a wildcard. > \"%s%%\" in src/drv_imap.c, line 1676. Fix: use * as a wildcard. > % is

[commit] isync/src

2006-03-19 Thread Oswald Buddenhagen
CVS commit by ossi: make config parsing more robust against bogus input and report errors more clearly. M +38 -28drv_imap.c 1.17 --- isync/src/drv_imap.c #1.16:1.17 @@ -255,9 +255,7 @@ init_ssl_ctx( imap_store_t *ctx ) fprintf( stderr, "Error, CertificateFile not defi

[commit] isync_1_0_branch: isync/src

2006-03-19 Thread Oswald Buddenhagen
CVS commit by ossi: make config parsing more robust against bogus input and report errors more clearly. M +38 -28drv_imap.c 1.10.2.2 --- isync/src/drv_imap.c #1.10.2.1:1.10.2.2 @@ -255,9 +255,7 @@ init_ssl_ctx( imap_store_t *ctx ) fprintf( stderr, "Error, CertificateF

[commit] isync/src

2006-03-19 Thread Oswald Buddenhagen
CVS commit by ossi: "fprintf( stderr," => "error(". new functions debugn() and infon() for messages with missing newline; warn() and error() act upon this. M +26 -29config.c 1.30 M +56 -60drv_imap.c 1.18 M +20 -20drv_maildir.c 1.13 M +4 -1 isync.h 1.55 M +8 -7

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: merge imap_t into imap_store_t - there is really no point in having them separated. M +109 -134 drv_imap.c 1.19 --- isync/src/drv_imap.c #1.18:1.19 @@ -108,5 +108,8 @@ struct imap_cmd; #define max_in_progress 50 /* make this configurable? */ -typedef struct imap {

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: whitespace and code verbosity M +3 -4 drv_imap.c 1.20 --- isync/src/drv_imap.c #1.19:1.20 @@ -235,6 +235,5 @@ static int init_ssl_ctx( imap_store_t *ctx ) { - imap_store_conf_t *conf = (imap_store_conf_t *)ctx->gen.conf; - imap_server_conf_t *srvc =

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: aggregate all (two ...) drivers in an array instead of naming them in each (one ...) location explicitly. M +14 -12config.c 1.31 M +3 -0 isync.h 1.56 --- isync/src/config.c #1.30:1.31 @@ -33,4 +33,6 @@ #include +driver_t *drivers[N_DRIVERS] = { &maild

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: keep the result of driver->list() and a flag whether it is valid in the store. M +9 -8 drv_imap.c 1.21 M +4 -3 drv_maildir.c 1.14 M +3 -1 isync.h 1.57 M +7 -20 main.c 1.55 --- isync/src/drv_imap.c #1.20:1.21 @@ -114,5 +114,4 @@ typedef s

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: move whole responsibility for recycling open stores/server connections to the drivers. M +51 -12drv_imap.c 1.22 M +18 -7 drv_maildir.c 1.15 M +6 -2 isync.h 1.58 M +12 -22main.c 1.56 --- isync/src/drv_imap.c #1.21:1.22 @@ -1037,5 +1037,5 @@

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
- mailbox synchronizer * Copyright (C) 2000-2002 Michael R. Elkins <[EMAIL PROTECTED]> - * Copyright (C) 2002-2004 Oswald Buddenhagen <[EMAIL PROTECTED]> + * Copyright (C) 2002-2006 Oswald Buddenhagen <[EMAIL PROTECTED]> * Copyright (C) 2004 Theodore Y. Ts'o <[EMAIL PROT

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: handle socket() failure and correctly report gethostbyname() failure. M +5 -1 drv_imap.c 1.24 --- isync/src/drv_imap.c #1.23:1.24 @@ -1266,5 +1266,5 @@ imap_open_store( store_conf_t *conf ) he = gethostbyname( srvc->host ); if (!he

[commit] isync/src

2006-03-20 Thread Oswald Buddenhagen
CVS commit by ossi: do not repeatedly get namespace from server. M +6 -2 drv_imap.c 1.25 --- isync/src/drv_imap.c #1.24:1.25 @@ -113,4 +113,5 @@ typedef struct imap_store { unsigned /*currentnc:1,*/ trashnc:1; int uidnext; /* from SELECT responses */ + unsigned

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: info() about opening of stores M +2 -0 isync.h 1.60 M +7 -4 main.c 1.58 M +1 -1 sync.c 1.79 --- isync/src/isync.h #1.59:1.60 @@ -247,4 +247,6 @@ unsigned char arc4_getbyte( void ); /* sync.c */ +extern const char *str_ms[2], *str_hl[2]; + #d

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: split box list preparation from "consumption". M +22 -16main.c 1.59 --- isync/src/main.c #1.58:1.59 @@ -195,5 +195,5 @@ main( int argc, char **argv ) store_t *ctx[2]; string_list_t *boxes[2], *mbox, *sbox, **mboxp, **sboxp, *cboxes, *chanptr; -

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: don't enter trash loop if not trashing at all. also, move expunge message where it belongs. not adding info("trashing"), as it will be replaced in a moment anyway. M +6 -4 sync.c 1.81 --- isync/src/sync.c #1.80:1.81 @@ -1073,7 +1073,7 @@ sync_boxes( store_t *ctx[

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: async merge: aggregate most variables of main() & sync_boxes() in main_vars_t resp. sync_vars_t. also some minor var renames, whitespace, comments. M +151 -131 main.c 1.60 M +222 -209 sync.c 1.80 [diff too large to include]

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: ok, mismerging and not running the reg-tests is lame. unscrew expunging again. M +29 -28sync.c 1.82 --- isync/src/sync.c #1.81:1.82 @@ -1073,6 +1073,6 @@ sync_boxes( store_t *ctx[], const char * for (t = 0; t < 2; t++) { - if ((svars->chan-

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: unscrew lf=>crlf conversion and tuid insertion M +3 -3 sync.c 1.83 --- isync/src/sync.c #1.82:1.83 @@ -240,5 +240,5 @@ copy_msg( store_t *ctx[], int t, message crd = -1; else if (scr < tcr) - crd = 1;

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: make the driver model, sync_chans() and sync_boxes() fully async. async drivers to follow ... M +102 -79 drv_imap.c 1.26 M +124 -74 drv_maildir.c 1.17 M +37 -20isync.h 1.61 M +169 -63 main.c 1.61 M +897 -398 sync.c 1.84 M +2 -10 util.c

[commit] isync/src

2006-03-21 Thread Oswald Buddenhagen
CVS commit by ossi: no/empty mailbox name means INBOX M +6 -2 main.c 1.62 --- isync/src/main.c #1.61:1.62 @@ -485,4 +485,6 @@ static void done_sync_dyn( int sts, void static void done_sync( int sts, void *aux ); +#define nz(a,b) ((a)?(a):(b)) + static void sync_chans( main_vars

Re: Error writing lockfile under Cygwin

2006-03-31 Thread Oswald Buddenhagen
On Fri, Mar 31, 2006 at 01:00:02PM +0100, Scot Becker wrote: > I gather this is a problem with colons in the filename, which cygwin > always balks at, even when they're quoted. > guess so. > Can you think of a work-around? > use a non-broken system. :) no, seriously, you can use the SyncState op

Re: Support imaps protocols over tunnels

2006-05-09 Thread Oswald Buddenhagen
On Mon, May 08, 2006 at 09:58:47PM -0400, Theodore Ts'o wrote: > I've found the following patch is necessary so I can use secure IMAP > over tunneled connections: > the patch is fine, but not its implications: the docu says about Tunnel "This makes most other IMAPAccount options superflous.", whic

Re: Support imaps protocols over tunnels

2006-05-10 Thread Oswald Buddenhagen
On Wed, May 10, 2006 at 07:24:34AM -0400, Theodore Tso wrote: > On Tue, May 09, 2006 at 10:15:25PM +0200, Oswald Buddenhagen wrote: > > the imaps: syntax is not nice anyway (it is the only option that > > combines two things in one), so maybe we should just add another > >

[commit] isync/src

2006-05-27 Thread Oswald Buddenhagen
CVS commit by ossi: seen messages are eligible for expiration even if they are recent in the mailbox. M +1 -1 sync.c 1.85 --- isync/src/sync.c #1.84:1.85 @@ -1223,5 +1223,5 @@ msgs_found_sel( sync_vars_t *svars, int if (nflags & F_FLAGGED)

[commit] isync/src

2006-05-27 Thread Oswald Buddenhagen
CVS commit by ossi: add comment M +1 -0 drv_maildir.c 1.18 --- isync/src/drv_maildir.c #1.17:1.18 @@ -1047,4 +1047,5 @@ maildir_store_msg( store_t *gctx, msg_da } close( fd ); + /* Moving seen messages to cur/ is strictly speaking incorrect, but makes mutt hap

Re: Subfolders not recursively synchronized?

2006-05-28 Thread Oswald Buddenhagen
On Sun, May 28, 2006 at 11:32:31AM +0200, Daniel Danner wrote: > Since I recently got a new mailbox, where subfolders are supported, I > just wondered if mbsync is really incapable of synchronizing all > folders recursively, or if I just did something wrong? > if your mailbox uses a dot as a path

[commit] isync/src

2006-05-28 Thread Oswald Buddenhagen
CVS commit by ossi: move assigning default port to the place of use M +5 -5 drv_imap.c 1.27 --- isync/src/drv_imap.c #1.26:1.27 @@ -1262,5 +1262,9 @@ imap_open_store( store_conf_t *conf, } else { memset( &addr, 0, sizeof(addr) ); - addr.sin_port

Re: Subfolders not recursively synchronized?

2006-05-28 Thread Oswald Buddenhagen
On Sun, May 28, 2006 at 03:54:32PM +0200, Daniel Danner wrote: > On Sunday 28 May 2006 12:54, Daniel Danner wrote: > > In which way will these "flattened" folders be put into the slave? And wont > > everything get confused when I try to push the "flattened" folders to the > > server again? > > Wel

[commit] isync/src

2006-05-28 Thread Oswald Buddenhagen
CVS commit by ossi: un-document "Host imaps:[...]" syntax and introduce new option UseIMAPS instead. apply ted's patch to support UseIMAPS in conjunction with Tunnel. document that SSLv2 is No Good (TM). M +9 -6 drv_imap.c 1.28 M +17 -10mbsync.1 1.4 --- isync/src/drv_imap.c

[commit] isync/src

2006-05-28 Thread Oswald Buddenhagen
CVS commit by ossi: be *slightly* more explicit about which options Tunnel makes superfluous. M +2 -1 mbsync.1 1.5 --- isync/src/mbsync.1 #1.4:1.5 @@ -234,5 +234,6 @@ Specify a command to run to establish a connection rather than opening a TCP socket. This allows you to run an IM

[commit] isync/src

2006-05-28 Thread Oswald Buddenhagen
CVS commit by ossi: don't crash in imap driver when Host is not specified. M +4 -4 drv_imap.c 1.29 --- isync/src/drv_imap.c #1.28:1.29 @@ -1350,10 +1350,10 @@ imap_open_store( store_conf_t *conf, info ("Logging in...\n"); if (!srvc->user) { -

[commit] isync/src/compat

2006-06-05 Thread Oswald Buddenhagen
CVS commit by ossi: enable the old account naming scheme to deal with duplicated ip addresses. this is not incompatible - previously, it would just create garbage. M +10 -10config.c 1.7 --- isync/src/compat/config.c #1.6:1.7 @@ -249,5 +249,5 @@ write_imap_server( FILE *fp, config_t *

[commit] isync/src/compat

2006-06-05 Thread Oswald Buddenhagen
CVS commit by ossi: create more descriptive account names, so password prompts look sane. the channel names follow the old scheme, though - they are used to compose sync state file names, and i don't feel like writing a migrator for this. M +39 -14config.c 1.6 M +2 -0 isync.h 1

[commit] isync_1_0_branch: isync/src

2006-07-29 Thread Oswald Buddenhagen
CVS commit by ossi: work around glibc bug: printf("%.*s", INT_MAX, s) tries to allocate 2G. M +1 -1 drv_maildir.c 1.8.2.1 M +1 -1 mdconvert.c 1.1.2.1 --- isync/src/drv_maildir.c #1.8:1.8.2.1 @@ -641,5 +641,5 @@ maildir_scan( maildir_store_t *ctx, msgl

[commit] isync/src

2006-07-29 Thread Oswald Buddenhagen
CVS commit by ossi: work around glibc bug: printf("%.*s", INT_MAX, s) tries to allocate 2G. M +1 -1 drv_maildir.c 1.19 M +1 -1 mdconvert.c 1.3 --- isync/src/drv_maildir.c #1.18:1.19 @@ -663,5 +663,5 @@ maildir_scan( maildir_store_t *ctx, msgl

[commit] isync/src

2006-07-30 Thread Oswald Buddenhagen
CVS commit by ossi: glibc seems to be *really* fucked up. M +4 -5 drv_maildir.c 1.20 --- isync/src/drv_maildir.c #1.19:1.20 @@ -660,9 +660,8 @@ maildir_scan( maildir_store_t *ctx, msgl else u = ru = strchr( entr

[commit] isync_1_0_branch: isync/src

2006-07-30 Thread Oswald Buddenhagen
CVS commit by ossi: another attempt at working around glibc breakage. M +4 -5 drv_maildir.c 1.8.2.2 --- isync/src/drv_maildir.c #1.8.2.1:1.8.2.2 @@ -638,9 +638,8 @@ maildir_scan( maildir_store_t *ctx, msgl else

Re: Fatal: buffer too small.

2006-07-31 Thread Oswald Buddenhagen
already fixed. -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay

Re: Segault during sync

2006-08-02 Thread Oswald Buddenhagen
On Wed, Aug 02, 2006 at 03:09:21PM +0200, Tino Keitel wrote: > Program received signal SIGSEGV, Segmentation fault. > 0xb7bcd76f in mallopt () from /lib/tls/libc.so.6 > (gdb) bt > #0 0xb7bcd76f in mallopt () from /lib/tls/libc.so.6 > #1 0xb7bcdba2 in free () from /lib/tls/libc.so.6 > looks like a

Re: isync-related project announcement: mswatch

2006-08-06 Thread Oswald Buddenhagen
On Sun, Aug 06, 2006 at 09:21:04AM -0700, Chris Frost wrote: > For this reason I have written mswatch. mswatch listens for mailbox changes > from two sets of mailboxes and runs runs a mailbox synchronizer > (I've developed mswatch using mbsync) when there are mailbox changes. > This allows mailbox

[commit] isync/src

2006-08-09 Thread Oswald Buddenhagen
CVS commit by ossi: memmove for overlapping mem copies. M +1 -1 drv_imap.c 1.30 --- isync/src/drv_imap.c #1.29:1.30 @@ -370,5 +370,5 @@ buffer_gets( buffer_t * b, char **s ) if (n) - memcpy( b->buf, b->buf + sta

[commit] isync/src

2006-08-10 Thread Oswald Buddenhagen
CVS commit by ossi: fix bug in newline conversion causing buffer overflows. this leads to segfaults and has some security impact. M +8 -7 sync.c 1.86 --- isync/src/sync.c #1.85:1.86 @@ -212,5 +212,5 @@ msg_fetched( int sts, void *aux ) SVARS(vars->aux) char *fmap, *b

Re: Segault during sync

2006-08-10 Thread Oswald Buddenhagen
On Thu, Aug 03, 2006 at 10:11:30PM +0200, Tino Keitel wrote: > I got another segfault and I ran mbsync in valdgrind. The output is > attached (sensitive data removed). > > Opening slave eazylocal... > ==1215== Conditional jump or move depends on uninitialised value(s) > ==1215==at 0x804B30B: s

Re: Many UIDVALIDITY changes (not uw-imap)

2006-08-10 Thread Oswald Buddenhagen
On Thu, Aug 10, 2006 at 09:19:40PM +0200, Daniel Danner wrote: > Although leading to an exitcode !=0 (which confuses mswatch), > i have to think about it. > I don't know which information could be helpful to answer this, > the output of mbsync -V -D, .mbsyncrc and the state file should be a good

Re: [commit] isync/src

2006-08-11 Thread Oswald Buddenhagen
On Fri, Aug 11, 2006 at 11:29:28AM +0200, Tino Keitel wrote: > thanks, no segfaults anymore and valgrind is happy, too. > good > Btw., I'm planning to do some compatibility tests with the old isync > 0.9.2 from Debian Sid and the current CVS version, to get a newer > package into Debian (hopefull

Re: Many UIDVALIDITY changes (not uw-imap)

2006-08-11 Thread Oswald Buddenhagen
On Fri, Aug 11, 2006 at 02:24:36PM +0200, Daniel Danner wrote: > On Thursday 10 August 2006 22:42, Oswald Buddenhagen wrote: > > the output of mbsync -V -D, .mbsyncrc and the state file should be a > > good start. > > Allright. Which state file exactly? > For the fold

Re: Only download messages

2006-09-09 Thread Oswald Buddenhagen
On Fri, Sep 08, 2006 at 09:11:33PM +0100, Bruno Harbulot wrote: > At the moment isync seems to try to upload some of the messages that > have disappeared ("Uploading messages."). > only if you downloaded them by other means than isync 1.x. otherwise it would be a bug ... > Is there any way around

[commit] isync/src

2006-10-24 Thread Oswald Buddenhagen
CVS commit by ossi: don't crash on truncating database. seems to affect only some bdb versions (e.g., 4.2). M +3 -2 drv_maildir.c 1.21 --- isync/src/drv_maildir.c #1.20:1.21 @@ -366,5 +366,6 @@ maildir_init_uid( maildir_store_t *ctx, #ifdef USE_DB if (ctx->db) { -

[commit] isync_1_0_branch: isync/src

2006-10-24 Thread Oswald Buddenhagen
CVS commit by ossi: backport: don't crash on truncating db M +3 -2 drv_maildir.c 1.8.2.3 --- isync/src/drv_maildir.c #1.8.2.2:1.8.2.3 @@ -346,5 +346,6 @@ maildir_init_uid( maildir_store_t *ctx, #ifdef USE_DB if (ctx->db) { - ctx->db->truncate( ctx->db, 0, 0 /

Re: [commit] isync/src

2006-10-28 Thread Oswald Buddenhagen
On Fri, Oct 27, 2006 at 10:15:36PM +0200, Tino Keitel wrote: > I also have to admit that I did the tests before the last commit in > the 1.0 branch, which also addresses an issue that could be the cause > of the segfault that I got. > please re-test. -- Hi! I'm a .signature virus! Copy me into y

Re: [commit] isync/src

2006-10-29 Thread Oswald Buddenhagen
On Mon, Oct 30, 2006 at 01:17:24AM +0100, Tino Keitel wrote: > The new isync version looks for a maildir ~/Maildir where it expexts > the INBOX folder. With the same setup, INBOX is saved as ~/ maildir>/INBOX when using isync 0.9.2. > the attached patch should fix this (without causing collateral

Re: [commit] isync/src

2006-10-31 Thread Oswald Buddenhagen
On Mon, Oct 30, 2006 at 01:22:38PM +0100, Tino Keitel wrote: > On Mon, Oct 30, 2006 at 07:08:01 +0100, Oswald Buddenhagen wrote: > > the attached patch should fix this (without causing collateral damage > > :}). > > Thanks, I'll re-test this evening. > i assum

  1   2   3   4   5   6   7   8   9   10   >