[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] Modem support, wildcards in etc/palms
- To: coldsync-hackers at lusars dot net
- Subject: [coldsync-hackers] Modem support, wildcards in etc/palms
- From: coldsync at brong dot net
- Date: Fri, 21 Jun 2002 16:09:08 +1000
- Organization: brong.net
- Reply-To: coldsync-hackers at lusars dot net
- Sender: owner-coldsync-hackers at lusars dot net
- User-Agent: Mutt/1.3.28i
Attached are a bunch of patches against the current CVS coldsync to
use enable modem sync without breaking the usual mode, as well as
some shortcuts to allow multiple daemon mode coldsyncs from the same
binary build.
The patches are as follows:
cvs-daemon-readfile.diff:
A really small patch to convince coldsync to read the file
given by the -f command line option in Daemon mode. Current
CVS has disabled reading the device from the command line in
Daemon mode, so there was no other way to handle multiple
daemons (i.e. 1 cradle, 1 modem) on the same machine.
cvs-palms.diff:
This patch changes the behaviour of palment.c when checking if
an entry in etc/palms matches the current palm. Specifically,
the strings '' or '*' in serial number and username fields are a
wildcard and match any palm, and the value '0' in the userid
field works similarly. This allows me to do:
*|Rep1|0|palmuser|Rep1|/home/palmuser/etc/Rep1.userconf
*|Rep2|0|palmuser|Rep2|/home/palmuser/etc/Rep2.userconf
*|Rep3|0|palmuser|Rep3|/home/palmuser/etc/Rep3.userconf
...
and not have to worry about the serial number (I mainly have
either visors or palms that are already in the field at the far
end of a modem to talk to) or the userid that the Windows
Hotsync allocated. We only use username to identify palms here
anyway.
cvs-modem.diff:
This is the big one. It takes the suggestion to remove the
setspeed lines posted to this list a while ago and expands on it
with new flags (PCONNFL_MODEM and LISTENFL_MODEM), a fix to make
flags available everywhere in PConnection_*.c, etc. Along with
this are some changes to device name handling (the special
string 'stdin' means the same as '-' for device names), and the
use of STDOUT_FILENO for writing if STDIN_FILENO is being used
for reading.
User visable changes are the special flag 'modem' in the
listen serial block.
Developer visable changes are a different calling syntax to
PConnection_foo.c's pconn_foo_open(), in which flags is no
longer passed as a command line option. Instead, flags has
been set in pconn->flags where it belongs. Of course you
shouldn't be calling them directly anyway, and the interface
to new_PConnection is unchanged.
Also note, while LISTENFL_* and PCONNFL_* are currently in
sync, there is no reason for them to be, so make sure that
the calls to new_PConnection create flags with something
like:
flags = baseflags |
((listenflags & LISTENFL_foo) ? PCONNFL_foo : 0) |
((listenflags & LISTENFL_bar) ? PCONNFL_bar : 0);
cvs-all.diff:
This contains all three of the above plus documentation. It
adds me to AUTHORS, adds a list of all files touched (except
documentation) to Changelog.2, documents the changes I've made
in coldsync.8 and new_PConnection.3, adds an example modem
entry to sample.coldsync.rc and adds a file README.modem to
the top level (this will need to be 'cvs add'ed if this
patch is merged into CVS).
README.modem details how to make ColdSync work with mgetty to
answer a modem and do a sync down it.
-----------------------
I hope this is useful to people, and I would love for it to be
integrated into to the CVS so I don't have to keep applying it
locally when things change. It is quite non-destructive - none
of the changes will bother you unless you actively alter your
configuration (the only exceptions here are the changed behaviour
of etc/palms - though only previously malformed files will do
anything now, and the different behaviour of -f in the daemon
case, but since it did nothing before, that doesn't hurt too much).
Regards,
Bron.
coldsync-modem-diffs.tar.gz