? gnome-pilot-0.1.65.tar.gz ? gnome-pilot.patch ? plhead.patch ? gpilotd/gpilotd.patch ? macros/macros.dep ? utils/make-password.patch Index: gpilotd/gpilotd.c =================================================================== RCS file: /cvs/gnome/gnome-pilot/gpilotd/gpilotd.c,v retrieving revision 1.125 diff -u -r1.125 gpilotd.c --- gpilotd/gpilotd.c 3 Dec 2001 11:00:31 -0000 1.125 +++ gpilotd/gpilotd.c 23 Apr 2002 10:36:22 -0000 @@ -46,6 +46,7 @@ #include #include #include +#include #include @@ -118,20 +119,20 @@ pilot_connect (GPilotDevice *device,int *error) { struct pi_sockaddr addr; - int sd; + int sd, listen_sd; int ret; if (device->type != PILOT_DEVICE_NETWORK) { pilot_set_baud_rate (device); } - if (!(sd = pi_socket (PI_AF_SLP, PI_SOCK_STREAM, PI_PF_PADP))) { + if (!(listen_sd = pi_socket (PI_AF_PILOT, PI_SOCK_STREAM, PI_PF_DLP))) { g_warning ("pi_socket: %s",strerror (errno)); if (error) *error = 1; return -1; } - addr.pi_family = PI_AF_SLP; + addr.pi_family = PI_AF_PILOT; /* Most important for networking @@ -145,29 +146,38 @@ strcpy (addr.pi_device,device->port); - ret = pi_bind (sd, (struct sockaddr*)&addr, sizeof (addr)); + ret = pi_bind (listen_sd, (struct sockaddr*)&addr, sizeof (addr)); if (ret == -1) { g_warning (_("Unable to bind to pilot")); - if (error) *error = 1; + if (error) + *error = 1; + pi_close(listen_sd); return 0; } - ret = pi_listen (sd,1); + ret = pi_listen (listen_sd, 1); if (ret != 0) { g_warning ("pi_listen: %s", strerror (errno)); - if (error) *error = 2; + if (error) + *error = 2; + pi_close(listen_sd); return 0; } - sd = pi_accept_to (sd, NULL,0, device->timeout); + sd = pi_accept_to (listen_sd, NULL,0, device->timeout); if (sd == -1) { g_warning ("pi_accept_to: %s", strerror (errno)); g_warning ("pi_accept_to: timeout was %d secs", device->timeout); - if (error) *error = 2; + if (error) + *error = 2; + pi_close(listen_sd); return 0; } - if (error) *error = 0; + if (error) + *error = 0; + pi_close(listen_sd); + return sd; } @@ -634,7 +644,6 @@ } } pilot_disconnect (pfd); - close (pfd); } else { if (connect_error==1) return FALSE; /* remove this device */ else return TRUE; @@ -830,6 +839,10 @@ if (line[0] == 'S') { if (!strncmp (line + 4, "Product=Handspring Visor", 24)) { + visor_exists = TRUE; + break; + } else if (!strncmp (line + 4, "Product=Palm Handheld", + 21)) { visor_exists = TRUE; break; } Index: macros/gnome-pilot.m4 =================================================================== RCS file: /cvs/gnome/gnome-common/macros/gnome-pilot.m4,v retrieving revision 1.40 diff -u -r1.40 gnome-pilot.m4 --- macros/gnome-pilot.m4 5 Mar 2002 16:57:29 -0000 1.40 +++ macros/gnome-pilot.m4 23 Apr 2002 10:36:22 -0000 @@ -25,7 +25,7 @@ else PISOCK_CFLAGS="-I$withval/include" incdir="$withval/include" - PISOCK_LIBS="-L$withval/lib -lpisock" + PISOCK_LIBS="-L$withval/lib -lpisock -lpisync" AC_MSG_CHECKING("for existance of $withval/lib/libpisock.so") if test -r $withval/lib/libpisock.so; then AC_MSG_RESULT("yes") Index: utils/make-password.c =================================================================== RCS file: /cvs/gnome/gnome-pilot/utils/make-password.c,v retrieving revision 1.4 diff -u -r1.4 make-password.c --- utils/make-password.c 27 Feb 2000 12:04:00 -0000 1.4 +++ utils/make-password.c 23 Apr 2002 10:36:22 -0000 @@ -34,16 +34,16 @@ char salt[3]; if (argc < 2) { - fprintf(stderr,"usage:%s %s\n",argv[0],TTYPrompt); + fprintf(stderr,"usage:%s\n",argv[0]); exit(2); } - if (!(sd = pi_socket(PI_AF_SLP, PI_SOCK_STREAM, PI_PF_PADP))) { + if (!(sd = pi_socket(PI_AF_PILOT, PI_SOCK_STREAM, PI_PF_PADP))) { perror("pi_socket"); exit(1); } - addr.pi_family = PI_AF_SLP; - strcpy(addr.pi_device,argv[1]); + addr.pi_family = PI_AF_PILOT; +// strcpy(addr.pi_device,argv[1]); ret = pi_bind(sd, (struct sockaddr*)&addr, sizeof(addr)); if(ret == -1) {