[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] speed



On Fri, Oct 17, 2003 at 10:19:49PM -0400, Christophe Beauregard wrote:
> On Friday 17 October 2003 19:07, Christophe Beauregard wrote:
> > Correct me if I'm wrong, but instead of implementing another SPC stack,
> > couldn't he just link his C program to libpconn and use
> > spc_client/dlp_cmd directly? That _appears_ to be what it's for, but I'm
> > not sure how far the implementation goes towards what is needed.
> 
> Okay, that's cool. It actually works.

	IIRC most SPC packets are just DLP with a header in front. So
yeah, the idea is that it should Just Work (tm).

> I cranked out a couple simple C conduits that use the spc_client code. See 
> attached. Once the SPC pipe is set up, all the DLP stuff just plain works. 

	Whoo-hoo!

> libpconn isn't exacly designed to be an external library (spc.h #including 
> "config.h" is a good indicator), but I hacked up a Makefile that does the 
> trick.

	I think the reason it includes "config.h" is that
"include/pconn/spc.h" is really a symlink to "src/spc.h", which means
that "spc.h" was originally written as a source file, rather than as a
file that can be installed in /usr/local/include. (And the reason for
that, of course, is so that it can use #if...#endif blocks to Do The
Right Thing depending on what the client machine looks like.)
	In this case, it looks as if it should be safe to remove the
'#include "config.h"' line from "spc.h". Though as a first phase, I
would replace that line with "foo bar baz" to cause a compilation
error. 'make -k' should then point out all of the files that use
"spc.h", and make it easy to check that they're all including
"config.h" on their own.

> Oh, and it would probably be a Bad Thing to try to close the SPC pconn using 
> PConn_close(). The spc_client close function looks like it'll probably do 
> the Wrong Thing.

	I think it would be sufficient to just remove the *_tini()
calls. If the conduit wants to close its SPC file descriptor, that's
fine.
	Also, bear in mind that the SPC file descriptor isn't really a
direct connection to the PDA: everything gets passed on by ColdSync.
So ColdSync can act as a "firewall" of sorts.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com                      views of ooblick.com
	    You mean Virtual Memory has to actually exist?
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.