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

Re: [coldsync-hackers] minor bugs



Bleah.  My mail server is sucking, so I saw arensb's response through
the archive first.

As far as appropriateness of error-recovery goes, it should be OK - it
doesn't look like anything io_close does, or calls, will break (right
now ;-).  But obviously I don't have a very strong feel for the
protocols, or the code.

Here's a diff to what I did:

--- ../../coldsync-2.2.2/libpconn/slp.c Thu Oct 11 22:07:09 2001
+++ slp.c       Mon Oct 29 10:29:56 2001
@@ -165,11 +165,7 @@
                {
                        SLP_TRACE(5)
                                fprintf(stderr, "EOF in preamble\n");
-                       close(pconn->fd);       /* Prevent others from
-                                                * writing to this broken
-                                                * file descriptor.
-                                                */
-                       pconn->fd = -1;
+                       pconn->io_close(pconn);
                        palm_errno = PALMERR_EOF;
                        return 0;
                }
@@ -498,12 +494,7 @@
                {
                        perror("slp_write: write");
                        palm_errno = PALMERR_SYSTEM;
-                       close(pconn->fd);
-                       pconn->fd = -1;         /* Prevent others from
-                                                * writing to this broken
-                                                * file descriptor.
-                                                */
-                       return -1;
+                       pconn->io_close(pconn);
                }
                sent += err;
        }

-- 
 Matthew Weigel
 Research Systems Programmer
 mcweigel@cs.cmu.edu ne weigel@pitt.edu

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.