Le Sunday 16 August 2009 20:01:41, vous avez écrit :
> Hi,
>
> I updated openobex and obexftp to new version. I tested it and it's work
> fine with my Nokia N72, with my Nokia N95 disconnect failed. I can do only
> one operation. With obex you can saw data stocked in the internal memory of
> your phone. If you a have a old symbian (S60v1 and S60v2). You can get data
> in your memory card only with obex protocol.
>
> To work fine it's required a patch to libusb:
>
> With this patch usb_get_string get first the string descriptor (4 chars)
> and if it's ok, the requested string. It's required by some device (like
> Nokia N70/N72).
>
> Tested ok in i386.
>
> BSDManiak
PATCH:
==== libusb.diff ====
diff -urN /usr/ports/devel/libusb/Makefile devel/libusb/Makefile
--- /usr/ports/devel/libusb/Makefile Sun Sep 16 04:53:01 2007
+++ devel/libusb/Makefile Sun Jul 13 01:20:59 2008
@@ -2,6 +2,7 @@
COMMENT= USB access library
+PKGNAME= ${DISTNAME}p0
DISTNAME= libusb-0.1.12
SHARED_LIBS= usb 9.0 \
usbpp 10.0
@@ -26,6 +27,7 @@
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
- --disable-build-docs
+ --disable-build-docs \
+ --enable-debug=yes
.include <bsd.port.mk>
diff -urN /usr/ports/devel/libusb/patches/patch-bsd_c
devel/libusb/patches/patch-bsd_c
--- /usr/ports/devel/libusb/patches/patch-bsd_c Wed Nov 15 19:34:13 2006
+++ devel/libusb/patches/patch-bsd_c Sun Apr 5 18:58:39 2009
@@ -1,7 +1,16 @@
$OpenBSD: patch-bsd_c,v 1.7 2006/11/15 18:34:13 pvalchev Exp $
---- bsd.c.orig Fri Mar 3 19:52:46 2006
-+++ bsd.c Tue Nov 14 21:00:00 2006
-@@ -361,7 +361,7 @@ int usb_bulk_read(usb_dev_handle *dev, i
+--- bsd.c.orig Sat Mar 4 03:52:46 2006
++++ bsd.c Sun Apr 5 18:58:36 2009
+@@ -325,7 +325,7 @@ int usb_bulk_read(usb_dev_handle *dev, int ep, char *b
+ /* Ensure the endpoint address is correct */
+ ep |= USB_ENDPOINT_IN;
+
+- fd = ensure_ep_open(dev, ep, O_RDONLY);
++ fd = ensure_ep_open(dev, ep, O_RDONLY | O_NONBLOCK);
+ if (fd < 0) {
+ if (usb_debug >= 2) {
+ #ifdef __FreeBSD_kernel__
+@@ -361,7 +361,7 @@ int usb_bulk_read(usb_dev_handle *dev, int ep, char *b
int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
@@ -10,7 +19,7 @@
/* Ensure the endpoint address is correct */
ep &= ~USB_ENDPOINT_IN;
-@@ -383,8 +383,7 @@ int usb_interrupt_write(usb_dev_handle *
+@@ -383,8 +383,7 @@ int usb_interrupt_write(usb_dev_handle *dev, int ep, c
USB_ERROR_STR(-errno, "error setting timeout: %s",
strerror(errno));
@@ -20,7 +29,7 @@
if (ret < 0)
#ifdef __FreeBSD_kernel__
USB_ERROR_STR(-errno, "error writing to interrupt endpoint %s.%d: %s",
-@@ -394,16 +393,13 @@ int usb_interrupt_write(usb_dev_handle *
+@@ -394,16 +393,13 @@ int usb_interrupt_write(usb_dev_handle *dev, int ep, c
dev->device->filename, UE_GET_ADDR(ep), strerror(errno));
#endif
@@ -39,7 +48,7 @@
/* Ensure the endpoint address is correct */
ep |= USB_ENDPOINT_IN;
-@@ -428,8 +424,7 @@ int usb_interrupt_read(usb_dev_handle *d
+@@ -428,8 +424,7 @@ int usb_interrupt_read(usb_dev_handle *dev, int ep, ch
if (ret < 0)
USB_ERROR_STR(-errno, "error setting short xfer: %s", strerror(errno));
@@ -49,7 +58,7 @@
if (ret < 0)
#ifdef __FreeBSD_kernel__
USB_ERROR_STR(-errno, "error reading from interrupt endpoint %s.
%d: %s",
-@@ -438,10 +433,7 @@ int usb_interrupt_read(usb_dev_handle *d
+@@ -438,10 +433,7 @@ int usb_interrupt_read(usb_dev_handle *dev, int ep, ch
USB_ERROR_STR(-errno, "error reading from interrupt endpoint %s.
%02d: %s",
dev->device->filename, UE_GET_ADDR(ep), strerror(errno));
#endif
diff -urN /usr/ports/devel/libusb/patches/patch-usb_c
devel/libusb/patches/patch-usb_c
--- /usr/ports/devel/libusb/patches/patch-usb_c Thu Jan 1 01:00:00 1970
+++ devel/libusb/patches/patch-usb_c Fri Jul 11 20:14:36 2008
@@ -0,0 +1,46 @@
+$OpenBSD$
+--- usb.c.orig Fri Jul 11 20:11:38 2008
++++ usb.c Fri Jul 11 20:13:40 2008
+@@ -219,12 +219,36 @@ usb_dev_handle *usb_open(struct usb_device *dev)
+ int usb_get_string(usb_dev_handle *dev, int index, int langid, char *buf,
+ size_t buflen)
+ {
+- /*
+- * We can't use usb_get_descriptor() because it's lacking the index
+- * parameter. This will be fixed in libusb 1.0
+- */
+- return usb_control_msg(dev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR,
+- (USB_DT_STRING << 8) + index, langid, buf, buflen,
1000);
++ struct usb_string_descriptor *desc = (struct usb_string_descriptor *)buf;
++ int res;
++
++ res = usb_control_msg(dev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR,
++ (USB_DT_STRING << 8) + index, langid, buf, 4, 1000);
++ if (res < 4) {
++ if (usb_debug >= 1) {
++ if (res < 0)
++ fprintf(stderr, "Unable to get descriptor (%d)\n", res);
++ else
++ fprintf(stderr, "String descriptor too short (expected %d,
got %d)\n", 8, res);
++ }
++
++ return res;
++ }
++
++ res = usb_control_msg(dev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR,
++ (USB_DT_STRING << 8) + index, langid, buf,
desc->bLength, 1000);
++ if (res < desc->bLength) {
++ if (usb_debug >= 1) {
++ if (res < 0)
++ fprintf(stderr, "Unable to get descriptor (%d)\n", res);
++ else
++ fprintf(stderr, "String descriptor too short (expected %d,
got %d)\n", desc->bLength, res);
++ }
++
++ return res;
++ }
++
++ return res;
+ }
+
+ int usb_get_string_simple(usb_dev_handle *dev, int index, char *buf, size_t
buflen)
==== END ====
==== openobex.diff ====
diff -urN /usr/ports/comms/openobex/CVS/Entries comms/openobex/CVS/Entries
--- /usr/ports/comms/openobex/CVS/Entries Sat Aug 15 11:59:22 2009
+++ comms/openobex/CVS/Entries Thu Jan 1 01:00:00 1970
@@ -1,4 +0,0 @@
-/Makefile/1.10/Sun Sep 16 01:37:10 2007//
-/distinfo/1.3/Thu Apr 5 15:37:47 2007//
-D/patches////
-D/pkg////
diff -urN /usr/ports/comms/openobex/CVS/Repository
comms/openobex/CVS/Repository
--- /usr/ports/comms/openobex/CVS/Repository Sat Aug 15 11:59:22 2009
+++ comms/openobex/CVS/Repository Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-ports/comms/openobex
diff -urN /usr/ports/comms/openobex/CVS/Root comms/openobex/CVS/Root
--- /usr/ports/comms/openobex/CVS/Root Sat Aug 15 11:59:22 2009
+++ comms/openobex/CVS/Root Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-/cvs
diff -urN /usr/ports/comms/openobex/Makefile comms/openobex/Makefile
--- /usr/ports/comms/openobex/Makefile Sun Sep 16 03:37:10 2007
+++ comms/openobex/Makefile Sun Aug 16 19:25:24 2009
@@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.10 2007/09/16 01:37:10 merdely Exp $
COMMENT= OBEX protocol implementation
-DISTNAME= openobex-1.0.1
-PKGNAME= ${DISTNAME}p3
-SHARED_LIBS += openobex 1.0 # .1.0
+DISTNAME= openobex-1.3
+SHARED_LIBS+= openobex 1.0 # .1.0
CATEGORIES= comms
HOMEPAGE= http://openobex.triq.net/
@@ -19,5 +18,10 @@
USE_GMAKE= Yes
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu
+CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include"
+
+LIB_DEPENDS= usb.>=9::devel/libusb
+WRKSRC= ${WRKDIR}/${PKGNAME}/
+WRKDIST= ${WRKDIR}/${PKGNAME}/
.include <bsd.port.mk>
diff -urN /usr/ports/comms/openobex/distinfo comms/openobex/distinfo
--- /usr/ports/comms/openobex/distinfo Thu Apr 5 17:37:47 2007
+++ comms/openobex/distinfo Wed Jul 9 19:00:51 2008
@@ -1,5 +1,5 @@
-MD5 (openobex-1.0.1.tar.gz) = N0Jma7mCWfrOdr5Jtz6onQ==
-RMD160 (openobex-1.0.1.tar.gz) = cNx9Lji4Ga8MNcyyb4BreqdoKw4=
-SHA1 (openobex-1.0.1.tar.gz) = qnOz+eNFCI6PHAcODnJ/WGgg0g4=
-SHA256 (openobex-1.0.1.tar.gz) = BmHBXotXhsmiINAlfKM5sU+94XTp60WWLuYFvfpNntg=
-SIZE (openobex-1.0.1.tar.gz) = 211696
+MD5 (openobex-1.3.tar.gz) = /qpd/lFRwOcOj4aPpGSKQw==
+RMD160 (openobex-1.3.tar.gz) = 84R04Xqv8Xmey19F3mqyPDvcjeA=
+SHA1 (openobex-1.3.tar.gz) = pvu1mRvBS5C6bEL68Ca/a/oyXX8=
+SHA256 (openobex-1.3.tar.gz) = OoC6JSTGakbbOsF6eIp1kBWh953mpJX83zoxbhn+fCM=
+SIZE (openobex-1.3.tar.gz) = 337614
diff -urN /usr/ports/comms/openobex/patches/CVS/Entries
comms/openobex/patches/CVS/Entries
--- /usr/ports/comms/openobex/patches/CVS/Entries Sat Aug 15 11:59:22
2009
+++ comms/openobex/patches/CVS/Entries Thu Jan 1 01:00:00 1970
@@ -1,7 +0,0 @@
-/patch-openobex-config_in/1.1.1.1/Fri Nov 12 08:04:22 2004//
-/patch-src_Makefile_in/1.1.1.1/Fri Nov 12 08:04:22 2004//
-/patch-src_irda_h/1.1.1.1/Fri Nov 12 08:04:22 2004//
-/patch-src_netbuf_h/1.1.1.1/Fri Nov 12 08:04:22 2004//
-/patch-src_obex_const_h/1.1.1.1/Fri Nov 12 08:04:22 2004//
-/patch-src_obex_h/1.1.1.1/Fri Nov 12 08:04:22 2004//
-D
diff -urN /usr/ports/comms/openobex/patches/CVS/Repository
comms/openobex/patches/CVS/Repository
--- /usr/ports/comms/openobex/patches/CVS/Repository Sat Aug 15 11:59:22
2009
+++ comms/openobex/patches/CVS/Repository Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-ports/comms/openobex/patches
diff -urN /usr/ports/comms/openobex/patches/CVS/Root
comms/openobex/patches/CVS/Root
--- /usr/ports/comms/openobex/patches/CVS/Root Sat Aug 15 11:59:22 2009
+++ comms/openobex/patches/CVS/Root Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-/cvs
diff -urN /usr/ports/comms/openobex/patches/patch-configure
comms/openobex/patches/patch-configure
--- /usr/ports/comms/openobex/patches/patch-configure Thu Jan 1 01:00:00
1970
+++ comms/openobex/patches/patch-configure Wed Jul 9 19:14:57 2008
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- configure.orig Wed Jul 9 19:13:40 2008
++++ configure Wed Jul 9 19:14:52 2008
+@@ -9352,7 +9352,7 @@ if test "${ac_cv_lib_usb_usb_get_busses+set}" = set; t
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lusb $LIBS"
++LIBS="-L${prefix}/lib -lusb $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -9425,7 +9425,7 @@ if test "${ac_cv_lib_usb_usb_interrupt_read+set}" = se
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lusb $LIBS"
++LIBS="-L${prefix}/lib -lusb $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
diff -urN /usr/ports/comms/openobex/patches/patch-lib_obex_main_c
comms/openobex/patches/patch-lib_obex_main_c
--- /usr/ports/comms/openobex/patches/patch-lib_obex_main_c Thu Jan 1
01:00:00 1970
+++ comms/openobex/patches/patch-lib_obex_main_c Wed Jul 9 19:35:09
2008
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- lib/obex_main.c.orig Thu May 4 13:24:21 2006
++++ lib/obex_main.c Wed Jul 9 19:35:05 2008
+@@ -250,7 +250,7 @@ int obex_data_indication(obex_t *self, uint8_t *buf, i
+ DEBUG(4, "Got %d bytes\n", actual);
+
+ /* Check if we are still connected */
+- if (actual <= 0) {
++ if (buf == NULL && buflen == 0 && actual <= 0) {
+ obex_deliver_event(self, OBEX_EV_LINKERR, 0, 0, TRUE);
+ return actual;
+ }
+@@ -270,7 +270,7 @@ int obex_data_indication(obex_t *self, uint8_t *buf, i
+ buflen);
+
+ /* Check if we are still connected */
+- if (actual <= 0) {
++ if (buf == NULL && buflen == 0 && actual <= 0) {
+ obex_deliver_event(self, OBEX_EV_LINKERR, 0,
0, TRUE);
+ return actual;
+ }
diff -urN /usr/ports/comms/openobex/patches/patch-lib_obex_transport_c
comms/openobex/patches/patch-lib_obex_transport_c
--- /usr/ports/comms/openobex/patches/patch-lib_obex_transport_c Thu
Jan 1 01:00:00 1970
+++ comms/openobex/patches/patch-lib_obex_transport_c Sat Jul 19 22:26:49
2008
@@ -0,0 +1,24 @@
+$OpenBSD$
+--- lib/obex_transport.c.orig Thu May 4 13:24:21 2006
++++ lib/obex_transport.c Sat Jul 19 22:26:47 2008
+@@ -411,9 +411,8 @@ int obex_transport_write(obex_t *self, buf_t *msg)
+ if (self->trans.connected != TRUE)
+ break;
+ DEBUG(4, "Endpoint %d\n",
self->trans.self.usb.data_endpoint_write);
+- actual = usb_bulk_write(self->trans.self.usb.dev_data,
+- self->trans.self.usb.data_endpoint_write,
+- (char *) msg->data, msg->data_size, USB_OBEX_TIMEOUT);
++ actual = usb_bulk_write(self->trans.self.usb.dev,
++ self->trans.self.usb.data_endpoint_write, (char *)
msg->data, msg->data_size, USB_OBEX_TIMEOUT);
+ break;
+ #endif /*HAVE_USB*/
+ case OBEX_TRANS_CUSTOM:
+@@ -460,7 +459,7 @@ int obex_transport_read(obex_t *self, int max, uint8_t
+ if (self->trans.connected != TRUE)
+ break;
+ DEBUG(4, "Endpoint %d\n",
self->trans.self.usb.data_endpoint_read);
+- actual = usb_bulk_read(self->trans.self.usb.dev_data,
++ actual = usb_bulk_read(self->trans.self.usb.dev,
+ self->trans.self.usb.data_endpoint_read,
+ buf_reserve_end(msg, self->mtu_rx), self->mtu_rx,
+ USB_OBEX_TIMEOUT);
diff -urN /usr/ports/comms/openobex/patches/patch-lib_usbobex_c
comms/openobex/patches/patch-lib_usbobex_c
--- /usr/ports/comms/openobex/patches/patch-lib_usbobex_c Thu Jan 1
01:00:00 1970
+++ comms/openobex/patches/patch-lib_usbobex_c Sun Jul 20 21:00:53 2008
@@ -0,0 +1,187 @@
+$OpenBSD$
+--- lib/usbobex.c.orig Wed Jan 18 13:59:15 2006
++++ lib/usbobex.c Sun Jul 20 21:00:49 2008
+@@ -66,28 +66,30 @@ static void find_eps(struct obex_usb_intf_transport_t
+ struct usb_endpoint_descriptor *ep0, *ep1;
+
+ if (data_intf.bNumEndpoints == 2) {
+- ep0 = data_intf.endpoint;
+- ep1 = data_intf.endpoint + 1;
+- if ((ep0->bEndpointAddress & USB_ENDPOINT_IN) &&
+- ((ep0->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK) &&
+- !(ep1->bEndpointAddress & USB_ENDPOINT_IN) &&
+- ((ep1->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK)) {
+- *found_active = 1;
+- intf->data_active_setting =
data_intf.bAlternateSetting;
+- intf->data_interface_active_description =
data_intf.iInterface;
+- intf->data_endpoint_read = ep0->bEndpointAddress;
+- intf->data_endpoint_write = ep1->bEndpointAddress;
+- }
+- if (!(ep0->bEndpointAddress & USB_ENDPOINT_IN) &&
+- ((ep0->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK) &&
+- (ep1->bEndpointAddress & USB_ENDPOINT_IN) &&
+- ((ep1->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK)) {
+- *found_active = 1;
+- intf->data_active_setting =
data_intf.bAlternateSetting;
+- intf->data_interface_active_description =
data_intf.iInterface;
+- intf->data_endpoint_read = ep1->bEndpointAddress;
+- intf->data_endpoint_write = ep0->bEndpointAddress;
+- }
++ ep0 = data_intf.endpoint + 1;
++ ep1 = data_intf.endpoint;
++ if ((ep0->bEndpointAddress & USB_ENDPOINT_IN) &&
++ ((ep0->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK) &&
++ !(ep1->bEndpointAddress & USB_ENDPOINT_IN) &&
++ ((ep1->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK)) {
++ *found_active = 1;
++ intf->data_active_setting =
data_intf.bAlternateSetting;
++ intf->data_interface_active_description =
data_intf.iInterface;
++ intf->data_endpoint_read = ep0->bEndpointAddress;
++ intf->data_endpoint_write = ep1->bEndpointAddress;
++ }
++
++ if (!(ep0->bEndpointAddress & USB_ENDPOINT_IN) &&
++ ((ep0->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK) &&
++ (ep1->bEndpointAddress & USB_ENDPOINT_IN) &&
++ ((ep1->bmAttributes & USB_ENDPOINT_TYPE_MASK) ==
USB_ENDPOINT_TYPE_BULK)) {
++ *found_active = 1;
++ intf->data_active_setting =
data_intf.bAlternateSetting;
++ intf->data_interface_active_description =
data_intf.iInterface;
++ intf->data_endpoint_read = ep1->bEndpointAddress;
++ intf->data_endpoint_write = ep0->bEndpointAddress;
++ }
++
+ }
+ if (data_intf.bNumEndpoints == 0) {
+ *found_idle = 1;
+@@ -266,20 +268,35 @@ int usbobex_find_interfaces(obex_interface_t **interfa
+ while (current) {
+ intf_array[num].usb.interface = current;
+ usb_handle = usb_open(current->device);
+- get_intf_string(usb_handle, &intf_array[num].usb.manufacturer,
+- current->device->descriptor.iManufacturer);
+- get_intf_string(usb_handle, &intf_array[num].usb.product,
+- current->device->descriptor.iProduct);
+- get_intf_string(usb_handle, &intf_array[num].usb.serial,
+- current->device->descriptor.iSerialNumber);
+- get_intf_string(usb_handle,
&intf_array[num].usb.configuration,
+- current->configuration_description);
+- get_intf_string(usb_handle,
&intf_array[num].usb.control_interface,
+- current->control_interface_description);
+- get_intf_string(usb_handle,
&intf_array[num].usb.data_interface_idle,
+- current->data_interface_idle_description);
+- get_intf_string(usb_handle,
&intf_array[num].usb.data_interface_active,
+- current->data_interface_active_description);
++
++ if (get_intf_string(usb_handle,
&intf_array[num].usb.manufacturer,
++ current->device->descriptor.iManufacturer) < 0)
++ DEBUG(1, "Unable to fetch manufacturer string\n");
++
++ if (get_intf_string(usb_handle, &intf_array[num].usb.product,
++ current->device->descriptor.iProduct) < 0)
++ DEBUG(1, "Unable to fetch product string\n");
++
++ if (get_intf_string(usb_handle, &intf_array[num].usb.serial,
++ current->device->descriptor.iSerialNumber) < 0)
++ DEBUG(1, "Unable to fetch serial number string\n");
++
++ if (get_intf_string(usb_handle,
&intf_array[num].usb.configuration,
++ current->configuration_description) < 0)
++ DEBUG(1, "Unable to fetch configuration string\n");
++
++ if (get_intf_string(usb_handle,
&intf_array[num].usb.control_interface,
++ current->control_interface_description) < 0)
++ DEBUG(1, "Unable to fetch control interface
string\n");
++
++ if (get_intf_string(usb_handle,
&intf_array[num].usb.data_interface_idle,
++ current->data_interface_idle_description) < 0)
++ DEBUG(1, "Unable to fetch date interface idle
string\n");
++
++ if (get_intf_string(usb_handle,
&intf_array[num].usb.data_interface_active,
++ current->data_interface_active_description) < 0)
++ DEBUG(1, "Unable to fetch date interface active
string\n");
++
+ usb_close(usb_handle);
+ current = current->next; num++;
+ }
+@@ -331,48 +348,35 @@ int usbobex_connect_request(obex_t *self)
+
+ DEBUG(4, "\n");
+
+- self->trans.self.usb.dev_control =
usb_open(self->trans.self.usb.device);
+- self->trans.self.usb.dev_data = usb_open(self->trans.self.usb.device);
++ self->trans.self.usb.dev = usb_open(self->trans.self.usb.device);
+
+- ret = usb_set_configuration(self->trans.self.usb.dev_control,
self->trans.self.usb.configuration);
++ ret = usb_set_configuration(self->trans.self.usb.dev,
self->trans.self.usb.configuration);
+ if (ret < 0) {
+- DEBUG(4, "Can't set configuration %d", ret);
++ DEBUG(4, "Can't set configuration %d", ret);
+ }
+
+- ret = usb_claim_interface(self->trans.self.usb.dev_control,
self->trans.self.usb.control_interface);
++ ret = usb_claim_interface(self->trans.self.usb.dev,
self->trans.self.usb.data_interface);
+ if (ret < 0) {
+ DEBUG(4, "Can't claim control interface %d", ret);
+ goto err1;
+ }
+
+- ret = usb_set_altinterface(self->trans.self.usb.dev_control,
self->trans.self.usb.control_setting);
++ ret = usb_set_altinterface(self->trans.self.usb.dev,
self->trans.self.usb.data_active_setting);
+ if (ret < 0) {
+ DEBUG(4, "Can't set control setting %d", ret);
+ goto err2;
+ }
+
+- ret = usb_claim_interface(self->trans.self.usb.dev_data,
self->trans.self.usb.data_interface);
+- if (ret < 0) {
+- DEBUG(4, "Can't claim data interface %d", ret);
+- goto err2;
+- }
+-
+- ret = usb_set_altinterface(self->trans.self.usb.dev_data,
self->trans.self.usb.data_active_setting);
+- if (ret < 0) {
+- DEBUG(4, "Can't set data active setting %d", ret);
+- goto err3;
+- }
+ self->trans.mtu = OBEX_MAXIMUM_MTU;
+ DEBUG(2, "transport mtu=%d\n", self->trans.mtu);
+ return 1;
+
+ err3:
+- usb_release_interface(self->trans.self.usb.dev_data,
self->trans.self.usb.data_interface);
++ usb_release_interface(self->trans.self.usb.dev,
self->trans.self.usb.data_interface);
+ err2:
+- usb_release_interface(self->trans.self.usb.dev_control,
self->trans.self.usb.control_interface);
++ usb_release_interface(self->trans.self.usb.dev,
self->trans.self.usb.control_interface);
+ err1:
+- usb_close(self->trans.self.usb.dev_data);
+- usb_close(self->trans.self.usb.dev_control);
++ usb_close(self->trans.self.usb.dev);
+ return ret;
+
+ #endif /* _WIN32 */
+@@ -391,21 +395,12 @@ int usbobex_disconnect_request(obex_t *self)
+ return 0;
+ #ifndef _WIN32
+ DEBUG(4, "\n");
+- ret = usb_set_altinterface(self->trans.self.usb.dev_data,
self->trans.self.usb.data_idle_setting);
+- if (ret < 0)
+- DEBUG(4, "Can't set data idle setting %d", ret);
+- ret = usb_release_interface(self->trans.self.usb.dev_data,
self->trans.self.usb.data_interface);
++ ret = usb_release_interface(self->trans.self.usb.dev,
self->trans.self.usb.data_interface);
+ if (ret < 0)
+ DEBUG(4, "Can't release data interface %d", ret);
+- ret = usb_release_interface(self->trans.self.usb.dev_control,
self->trans.self.usb.control_interface);
+- if (ret < 0)
+- DEBUG(4, "Can't release control interface %d", ret);
+- ret = usb_close(self->trans.self.usb.dev_data);
++ ret = usb_close(self->trans.self.usb.dev);
+ if (ret < 0)
+ DEBUG(4, "Can't close data interface %d", ret);
+- ret = usb_close(self->trans.self.usb.dev_control);
+- if (ret < 0)
+- DEBUG(4, "Can't close control interface %d", ret);
+ #endif /* _WIN32 */
+ return ret;
+ }
diff -urN /usr/ports/comms/openobex/patches/patch-lib_usbobex_h
comms/openobex/patches/patch-lib_usbobex_h
--- /usr/ports/comms/openobex/patches/patch-lib_usbobex_h Thu Jan 1
01:00:00 1970
+++ comms/openobex/patches/patch-lib_usbobex_h Fri Jul 11 21:55:57 2008
@@ -0,0 +1,22 @@
+$OpenBSD$
+--- lib/usbobex.h.orig Tue Jan 3 19:36:15 2006
++++ lib/usbobex.h Fri Jul 11 21:55:54 2008
+@@ -52,8 +52,7 @@ struct obex_usb_intf_transport_t {
+ * in active setting */
+ int data_endpoint_read; /* OBEX data/slave interface
read endpoint */
+ int data_endpoint_write; /* OBEX data/slave interface
write endpoint */
+- usb_dev_handle *dev_control; /* libusb handler for control
interace */
+- usb_dev_handle *dev_data; /* libusb handler for data
interface */
++ usb_dev_handle *dev; /* libusb handler for control
& data interface */
+ };
+
+ /* "Union Functional Descriptor" from CDC spec 5.2.3.X
+@@ -83,7 +82,7 @@ struct cdc_union_desc {
+ #define USB_DT_CS_INTERFACE 0x24
+ #define CDC_DATA_INTERFACE_TYPE 0x0a
+
+-#define USB_MAX_STRING_SIZE 256
++#define USB_MAX_STRING_SIZE 127
+ #define USB_OBEX_TIMEOUT 10000 /* 10 seconds */
+
+ void usbobex_prepare_connect(obex_t *self, struct obex_usb_intf_transport_t
*intf);
diff -urN /usr/ports/comms/openobex/patches/patch-openobex-config_in
comms/openobex/patches/patch-openobex-config_in
--- /usr/ports/comms/openobex/patches/patch-openobex-config_in Fri Nov 12
09:04:22 2004
+++ comms/openobex/patches/patch-openobex-config_in Thu Jan 1 01:00:00
1970
@@ -1,20 +0,0 @@
-$OpenBSD: patch-openobex-config_in,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
---- openobex-config.in.orig Wed Oct 20 22:18:55 2004
-+++ openobex-config.in Wed Oct 20 22:19:30 2004
-@@ -4,6 +4,7 @@ pref...@prefix@
- exec_pref...@exec_prefix@
- exec_prefix_set=no
- included...@includedir@
-+libd...@libdir@
-
- usage()
- {
-@@ -87,7 +88,7 @@ if $cflags; then
- fi
-
- if $libs; then
-- all_flags="$all_flags $services $the_libs -lopenobex"
-+ all_flags="$all_flags $services $the_libs -L$libdir -lopenobex"
- fi
-
- if test -z "$all_flags" || test "x$all_flags" = "x "; then
diff -urN /usr/ports/comms/openobex/patches/patch-src_Makefile_in
comms/openobex/patches/patch-src_Makefile_in
--- /usr/ports/comms/openobex/patches/patch-src_Makefile_in Fri Nov 12
09:04:22 2004
+++ comms/openobex/patches/patch-src_Makefile_in Thu Jan 1 01:00:00
1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_Makefile_in,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
---- src/Makefile.in.orig Fri Nov 12 10:51:50 2004
-+++ src/Makefile.in Fri Nov 12 10:52:19 2004
-@@ -95,7 +95,7 @@ lib_LTLIBRARIES = libopenobex.la
- libopenobex_la_SOURCES = obex.c obex_main.c obex_main.h
obex_connect.c obex_connect.h obex_header.c obex_header.h obex_object.c
obex_object.h obex_transport.c obex_transport.h obex_server.c
obex_server.h obex_client.c obex_client.h irobex.c irobex.h
inobex.c inobex.h btobex.c btobex.h netbuf.c netbuf.h
irda.h irda_wrap.h
-
-
--libopenobex_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):
$(LT_AGE) -release $(LT_RELEASE) -export-symbols
$(top_srcdir)/src/obex.sym
-+libopenobex_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):
$(LT_AGE) -export-symbols $(top_srcdir)/src/obex.sym
-
-
- INCLUDES = -I$(top_srcdir)/src
diff -urN /usr/ports/comms/openobex/patches/patch-src_irda_h
comms/openobex/patches/patch-src_irda_h
--- /usr/ports/comms/openobex/patches/patch-src_irda_h Fri Nov 12 09:04:22
2004
+++ comms/openobex/patches/patch-src_irda_h Thu Jan 1 01:00:00 1970
@@ -1,13 +0,0 @@
-$OpenBSD: patch-src_irda_h,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
---- src/irda.h.orig Wed Oct 20 21:47:28 2004
-+++ src/irda.h Wed Oct 20 21:47:46 2004
-@@ -26,7 +26,9 @@
- #define IRDA_H
-
- #include <sys/types.h>
-+#ifndef __OpenBSD__
- #include <stdint.h>
-+#endif
-
- /* Hint bit positions for first hint byte */
- #define HINT_PNP 0x01
diff -urN /usr/ports/comms/openobex/patches/patch-src_netbuf_h
comms/openobex/patches/patch-src_netbuf_h
--- /usr/ports/comms/openobex/patches/patch-src_netbuf_h Fri Nov 12
09:04:22 2004
+++ comms/openobex/patches/patch-src_netbuf_h Thu Jan 1 01:00:00 1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_netbuf_h,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
---- src/netbuf.h.orig Wed Oct 20 21:48:32 2004
-+++ src/netbuf.h Wed Oct 20 21:48:55 2004
-@@ -37,7 +37,11 @@
- #ifndef G_NETBUF_H
- #define G_NETBUF_H
-
-+#ifndef __OpenBSD__
- #include <stdint.h>
-+#else
-+#include <sys/types.h>
-+#endif
-
- typedef struct _slist_t{
- void *data;
diff -urN /usr/ports/comms/openobex/patches/patch-src_obex_const_h
comms/openobex/patches/patch-src_obex_const_h
--- /usr/ports/comms/openobex/patches/patch-src_obex_const_h Fri Nov 12
09:04:22 2004
+++ comms/openobex/patches/patch-src_obex_const_h Thu Jan 1 01:00:00
1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_obex_const_h,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
---- src/obex_const.h.orig Wed Oct 20 21:46:41 2004
-+++ src/obex_const.h Wed Oct 20 21:47:01 2004
-@@ -30,7 +30,11 @@
- #ifndef OBEX_CONST_H
- #define OBEX_CONST_H
-
-+#ifndef __OpenBSD__
- #include <stdint.h>
-+#else
-+#include <sys/types.h>
-+#endif
-
- typedef union {
- uint32_t bq4;
diff -urN /usr/ports/comms/openobex/patches/patch-src_obex_h
comms/openobex/patches/patch-src_obex_h
--- /usr/ports/comms/openobex/patches/patch-src_obex_h Fri Nov 12 09:04:22
2004
+++ comms/openobex/patches/patch-src_obex_h Thu Jan 1 01:00:00 1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_obex_h,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
---- src/obex.h.orig Wed Oct 20 21:47:57 2004
-+++ src/obex.h Wed Oct 20 21:48:22 2004
-@@ -30,7 +30,11 @@
- #ifndef OBEX_H
- #define OBEX_H
-
-+#ifndef __OpenBSD__
- #include <stdint.h>
-+#else
-+#include <sys/types.h>
-+#endif
-
- #ifdef _WIN32
- #include <winsock.h>
diff -urN /usr/ports/comms/openobex/pkg/CVS/Entries
comms/openobex/pkg/CVS/Entries
--- /usr/ports/comms/openobex/pkg/CVS/Entries Sat Aug 15 11:59:22 2009
+++ comms/openobex/pkg/CVS/Entries Thu Jan 1 01:00:00 1970
@@ -1,4 +0,0 @@
-/DESCR/1.1.1.1/Fri Nov 12 08:04:22 2004//
-/PFRAG.shared/1.2/Fri Dec 23 14:16:01 2005//
-/PLIST/1.1.1.1/Fri Nov 12 08:04:22 2004//
-D
diff -urN /usr/ports/comms/openobex/pkg/CVS/Repository
comms/openobex/pkg/CVS/Repository
--- /usr/ports/comms/openobex/pkg/CVS/Repository Sat Aug 15 11:59:22
2009
+++ comms/openobex/pkg/CVS/Repository Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-ports/comms/openobex/pkg
diff -urN /usr/ports/comms/openobex/pkg/CVS/Root comms/openobex/pkg/CVS/Root
--- /usr/ports/comms/openobex/pkg/CVS/Root Sat Aug 15 11:59:22 2009
+++ comms/openobex/pkg/CVS/Root Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-/cvs
diff -urN /usr/ports/comms/openobex/pkg/PLIST comms/openobex/pkg/PLIST
--- /usr/ports/comms/openobex/pkg/PLIST Fri Nov 12 09:04:22 2004
+++ comms/openobex/pkg/PLIST Fri Jul 11 17:13:42 2008
@@ -1,10 +1,11 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/11/12 08:04:22 grange Exp $
%%SHARED%%
-bin/openobex-config
include/openobex/
include/openobex/obex.h
include/openobex/obex_const.h
lib/libopenobex.a
lib/libopenobex.la
+lib/pkgconfig/
+lib/pkgconfig/openobex.pc
share/aclocal/
share/aclocal/openobex.m4
==== END ====
==== obexftp.diff ====
diff -urN /usr/ports/comms/obexftp/CVS/Entries comms/obexftp/CVS/Entries
--- /usr/ports/comms/obexftp/CVS/Entries Sat Aug 15 11:59:22 2009
+++ comms/obexftp/CVS/Entries Thu Jan 1 01:00:00 1970
@@ -1,4 +0,0 @@
-/Makefile/1.9/Sun Sep 16 01:37:09 2007//
-/distinfo/1.3/Thu Apr 5 15:37:47 2007//
-D/patches////
-D/pkg////
diff -urN /usr/ports/comms/obexftp/CVS/Repository comms/obexftp/CVS/Repository
--- /usr/ports/comms/obexftp/CVS/Repository Sat Aug 15 11:59:22 2009
+++ comms/obexftp/CVS/Repository Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-ports/comms/obexftp
diff -urN /usr/ports/comms/obexftp/CVS/Root comms/obexftp/CVS/Root
--- /usr/ports/comms/obexftp/CVS/Root Sat Aug 15 11:59:22 2009
+++ comms/obexftp/CVS/Root Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-/cvs
diff -urN /usr/ports/comms/obexftp/Makefile comms/obexftp/Makefile
--- /usr/ports/comms/obexftp/Makefile Sun Sep 16 03:37:09 2007
+++ comms/obexftp/Makefile Sun Aug 16 19:27:18 2009
@@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.9 2007/09/16 01:37:09 merdely Exp $
COMMENT= file copying over the OBEX protocol
-DISTNAME= obexftp-0.10.4
-PKGNAME= ${DISTNAME}p1
-SHARED_LIBS += bfb 0.4 # .0.4
-SHARED_LIBS += cobexbfb 0.8 # .0.8
+DISTNAME= obexftp-0.23
+SHARED_LIBS += bfb 0.8 # .0.8
SHARED_LIBS += obexftp 0.11 # .0.11
+SHARED_LIBS += multicobex 1.1
CATEGORIES= comms
HOMEPAGE= http://triq.net/obex/
@@ -15,13 +14,22 @@
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-WANTLIB= c
+WANTLIB= c m
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openobex/}
-LIB_DEPENDS= openobex.>=1::comms/openobex
+LIB_DEPENDS= openobex.>=1::comms/openobex \
+ ruby.>=1::lang/ruby \
+ iconv.>=5::converters/libiconv \
+ usb::devel/libusb
+
CONFIGURE_STYLE= gnu
USE_LIBTOOL= Yes
+USE_GMAKE= Yes
+
+MODULES= lang/ruby
+
+EXTRACT_SUFX= .tar.bz2
.include <bsd.port.mk>
diff -urN /usr/ports/comms/obexftp/distinfo comms/obexftp/distinfo
--- /usr/ports/comms/obexftp/distinfo Thu Apr 5 17:37:47 2007
+++ comms/obexftp/distinfo Tue Jul 28 17:35:12 2009
@@ -1,5 +1,5 @@
-MD5 (obexftp-0.10.4.tar.gz) = oBuYPmQISBImBdkCK1E9tw==
-RMD160 (obexftp-0.10.4.tar.gz) = 6vXGjvo++0a9TC4AphKMsXXEutU=
-SHA1 (obexftp-0.10.4.tar.gz) = YYVBpjkCXxL99tkuCNPSYnIyKxQ=
-SHA256 (obexftp-0.10.4.tar.gz) = gUAkvGYHGFZF0sA43yVJLTQLIokC9GhFTTtoFd5fdNM=
-SIZE (obexftp-0.10.4.tar.gz) = 374317
+MD5 (obexftp-0.23.tar.bz2) = 8gdiBhtovJIegL5K68NJ6w==
+RMD160 (obexftp-0.23.tar.bz2) = uR44FVJLGoBCQ18vJ/3Rmysq7CY=
+SHA1 (obexftp-0.23.tar.bz2) = WaFIm+38lDDE9Ol0di+3jeKwSNU=
+SHA256 (obexftp-0.23.tar.bz2) = RKdP8ojTjA91NU1rwu/n1t7BARLq/y57EOKSsNIQWzY=
+SIZE (obexftp-0.23.tar.bz2) = 402552
diff -urN /usr/ports/comms/obexftp/patches/CVS/Entries
comms/obexftp/patches/CVS/Entries
--- /usr/ports/comms/obexftp/patches/CVS/Entries Sat Aug 15 11:59:22
2009
+++ comms/obexftp/patches/CVS/Entries Thu Jan 1 01:00:00 1970
@@ -1,4 +0,0 @@
-/patch-obexftp_client_c/1.1.1.1/Fri Nov 12 08:06:54 2004//
-/patch-obexftp_dirtraverse_c/1.1.1.1/Fri Nov 12 08:06:54 2004//
-/patch-obexftp_obexftp_io_c/1.1.1.1/Fri Nov 12 08:06:54 2004//
-D
diff -urN /usr/ports/comms/obexftp/patches/CVS/Repository
comms/obexftp/patches/CVS/Repository
--- /usr/ports/comms/obexftp/patches/CVS/Repository Sat Aug 15 11:59:22
2009
+++ comms/obexftp/patches/CVS/Repository Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-ports/comms/obexftp/patches
diff -urN /usr/ports/comms/obexftp/patches/CVS/Root
comms/obexftp/patches/CVS/Root
--- /usr/ports/comms/obexftp/patches/CVS/Root Sat Aug 15 11:59:22 2009
+++ comms/obexftp/patches/CVS/Root Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-/cvs
diff -urN /usr/ports/comms/obexftp/patches/patch-apps_obexftp_c
comms/obexftp/patches/patch-apps_obexftp_c
--- /usr/ports/comms/obexftp/patches/patch-apps_obexftp_c Thu Jan 1
01:00:00 1970
+++ comms/obexftp/patches/patch-apps_obexftp_c Sun Aug 16 19:34:16 2009
@@ -0,0 +1,41 @@
+$OpenBSD$
+--- apps/obexftp.c.orig Tue Feb 17 19:27:48 2009
++++ apps/obexftp.c Sun Aug 16 19:34:11 2009
+@@ -29,9 +29,7 @@
+
+ #include <sys/types.h>
+
+-#ifdef HAVE_SYS_TIMES_H
+ #include <sys/times.h>
+-#endif
+
+ #include <obexftp/obexftp.h>
+ #include <obexftp/client.h>
+@@ -250,9 +248,8 @@ static int use_path=1;
+ static int cli_connect_uuid(const char *uuid, int uuid_len)
+ {
+ int ret, retry;
+-#ifdef HAVE_SYS_TIMES_H
+ clock_t clock;
+-#endif
++ struct tms buf;
+
+ if (cli == NULL) {
+
+@@ -273,14 +270,10 @@ static int cli_connect_uuid(const char *uuid, int uuid
+ for (retry = 0; retry < 3; retry++) {
+
+ /* Connect */
+-#ifdef HAVE_SYS_TIMES_H
+- clock = times(NULL);
+-#endif
++ clock = times(&buf);
+ ret = obexftp_connect_src(cli, src_dev, device, channel, uuid,
uuid_len);
+-#ifdef HAVE_SYS_TIMES_H
+- clock = times(NULL)-clock;
++ clock = times(&buf)-clock;
+ fprintf(stderr, "Tried to connect for %ldms\n", clock);
+-#endif
+ if (ret >= 0)
+ return ret;
+ switch (errno) {
diff -urN /usr/ports/comms/obexftp/patches/patch-apps_obexftp_c.orig
comms/obexftp/patches/patch-apps_obexftp_c.orig
--- /usr/ports/comms/obexftp/patches/patch-apps_obexftp_c.orig Thu Jan 1
01:00:00 1970
+++ comms/obexftp/patches/patch-apps_obexftp_c.orig Sun Aug 16 19:32:04
2009
@@ -0,0 +1,25 @@
+$OpenBSD$
+--- apps/obexftp.c.orig Tue Feb 17 19:27:48 2009
++++ apps/obexftp.c Sun Aug 16 19:31:21 2009
+@@ -252,6 +252,7 @@ static int cli_connect_uuid(const char *uuid, int uuid
+ int ret, retry;
+ #ifdef HAVE_SYS_TIMES_H
+ clock_t clock;
++ struct tms buf;
+ #endif
+
+ if (cli == NULL) {
+@@ -274,11 +275,11 @@ static int cli_connect_uuid(const char *uuid, int uuid
+
+ /* Connect */
+ #ifdef HAVE_SYS_TIMES_H
+- clock = times(NULL);
++ clock = times(&buf);
+ #endif
+ ret = obexftp_connect_src(cli, src_dev, device, channel, uuid,
uuid_len);
+ #ifdef HAVE_SYS_TIMES_H
+- clock = times(NULL)-clock;
++ clock = times(&buf)-clock;
+ fprintf(stderr, "Tried to connect for %ldms\n", clock);
+ #endif
+ if (ret >= 0)
diff -urN /usr/ports/comms/obexftp/patches/patch-configure
comms/obexftp/patches/patch-configure
--- /usr/ports/comms/obexftp/patches/patch-configure Thu Jan 1 01:00:00
1970
+++ comms/obexftp/patches/patch-configure Sun Aug 16 18:10:54 2009
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- configure.orig Tue Feb 17 19:28:02 2009
++++ configure Sun Aug 16 18:08:23 2009
+@@ -22916,6 +22916,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++ #include <sys/types.h>
+ #include <openobex/obex.h>
+ #include <openobex/obex_const.h>
+
diff -urN /usr/ports/comms/obexftp/patches/patch-obexftp_client_c
comms/obexftp/patches/patch-obexftp_client_c
--- /usr/ports/comms/obexftp/patches/patch-obexftp_client_c Fri Nov 12
09:06:54 2004
+++ comms/obexftp/patches/patch-obexftp_client_c Sun Aug 16 18:10:54
2009
@@ -1,45 +1,12 @@
-$OpenBSD: patch-obexftp_client_c,v 1.1.1.1 2004/11/12 08:06:54 grange Exp $
---- obexftp/client.c.orig Thu Apr 29 23:44:07 2004
-+++ obexftp/client.c Mon Nov 8 23:13:21 2004
-@@ -78,6 +78,7 @@
- #endif
- #endif
+$OpenBSD$
+--- obexftp/client.c.orig Sun Aug 16 18:10:05 2009
++++ obexftp/client.c Sun Aug 16 18:10:49 2009
+@@ -51,8 +51,6 @@
-+#include <limits.h>
+ #ifdef HAVE_BLUETOOTH
+ #include "bt_kit.h"
+-#else
+-#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+ #endif /* HAVE_BLUETOOTH */
- typedef struct { /* fixed to 6 bytes for now */
- uint8_t code;
-@@ -427,10 +428,10 @@ int obexftp_cli_connect(obexftp_client_t
-
- }
- #endif
-- if (ret == -1 /* -ESOCKTNOSUPPORT */)
-+ if (ret < 0 /* -ESOCKTNOSUPPORT */)
- ret = IrOBEX_TransportConnect(cli->obexhandle, "OBEX");
- DEBUG(3, "%s() IR %d\n", __func__, ret);
-- if (ret == -1 /* -ESOCKTNOSUPPORT */)
-+ if (ret < 0 /* -ESOCKTNOSUPPORT */)
- ret = OBEX_TransportConnect(cli->obexhandle, NULL, 0);
- DEBUG(3, "%s() TC %d\n", __func__, ret);
- #endif
-@@ -899,6 +900,9 @@ static time_t atotime (const char *date)
-
- DIR *obexftp_opendir(obexftp_client_t *cli, const char *name)
- {
-+ struct dirstream *stream;
-+ int res;
-+
- /* purge stat buffer */
- while (statbuf != NULL) {
- STATENTRY *p = statbuf->next;
-@@ -908,8 +912,8 @@ DIR *obexftp_opendir(obexftp_client_t *c
- statbuf = NULL;
-
- /* read dir */
-- struct dirstream *stream = malloc(sizeof(struct dirstream));
-- int res = 0;
-+ stream = malloc(sizeof(struct dirstream));
-+ res = 0;
-
- /* List folder */
- res = obexftp_list(cli, NULL, name);
+ #include <openobex/obex.h>
diff -urN /usr/ports/comms/obexftp/patches/patch-obexftp_dirtraverse_c
comms/obexftp/patches/patch-obexftp_dirtraverse_c
--- /usr/ports/comms/obexftp/patches/patch-obexftp_dirtraverse_c Fri
Nov 12 09:06:54 2004
+++ comms/obexftp/patches/patch-obexftp_dirtraverse_c Thu Jan 1 01:00:00
1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-obexftp_dirtraverse_c,v 1.1.1.1 2004/11/12 08:06:54 grange
Exp $
---- obexftp/dirtraverse.c.orig Wed Oct 20 22:11:21 2004
-+++ obexftp/dirtraverse.c Wed Oct 20 22:11:36 2004
-@@ -29,6 +29,7 @@
- #define _POSIX_PATH_MAX MAX_PATH
- #endif /* _WIN32 */
- #include <dirent.h>
-+#include <limits.h>
-
- #include "dirtraverse.h"
- #include <common.h>
diff -urN /usr/ports/comms/obexftp/patches/patch-obexftp_obexftp_io_c
comms/obexftp/patches/patch-obexftp_obexftp_io_c
--- /usr/ports/comms/obexftp/patches/patch-obexftp_obexftp_io_c Fri Nov 12
09:06:54 2004
+++ comms/obexftp/patches/patch-obexftp_obexftp_io_c Thu Jan 1 01:00:00
1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-obexftp_obexftp_io_c,v 1.1.1.1 2004/11/12 08:06:54 grange Exp
$
---- obexftp/obexftp_io.c.orig Wed Oct 20 22:10:20 2004
-+++ obexftp/obexftp_io.c Wed Oct 20 22:10:53 2004
-@@ -26,6 +26,7 @@
- #include <sys/stat.h>
-
- #include <fcntl.h>
-+#include <limits.h>
- #include <string.h>
- #include <time.h>
-
diff -urN /usr/ports/comms/obexftp/pkg/CVS/Entries
comms/obexftp/pkg/CVS/Entries
--- /usr/ports/comms/obexftp/pkg/CVS/Entries Sat Aug 15 11:59:22 2009
+++ comms/obexftp/pkg/CVS/Entries Thu Jan 1 01:00:00 1970
@@ -1,4 +0,0 @@
-/DESCR/1.1.1.1/Fri Nov 12 08:06:54 2004//
-/PFRAG.shared/1.2/Fri Dec 23 14:16:01 2005//
-/PLIST/1.1.1.1/Fri Nov 12 08:06:54 2004//
-D
diff -urN /usr/ports/comms/obexftp/pkg/CVS/Repository
comms/obexftp/pkg/CVS/Repository
--- /usr/ports/comms/obexftp/pkg/CVS/Repository Sat Aug 15 11:59:22 2009
+++ comms/obexftp/pkg/CVS/Repository Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-ports/comms/obexftp/pkg
diff -urN /usr/ports/comms/obexftp/pkg/CVS/Root comms/obexftp/pkg/CVS/Root
--- /usr/ports/comms/obexftp/pkg/CVS/Root Sat Aug 15 11:59:22 2009
+++ comms/obexftp/pkg/CVS/Root Thu Jan 1 01:00:00 1970
@@ -1 +0,0 @@
-/cvs
diff -urN /usr/ports/comms/obexftp/pkg/PFRAG.shared
comms/obexftp/pkg/PFRAG.shared
--- /usr/ports/comms/obexftp/pkg/PFRAG.shared Fri Dec 23 15:16:01 2005
+++ comms/obexftp/pkg/PFRAG.shared Sat Jul 19 16:05:23 2008
@@ -1,4 +1,6 @@
-...@comment $OpenBSD: PFRAG.shared,v 1.2 2005/12/23 14:16:01 bernd Exp $
+...@comment $OpenBSD$
@lib lib/libbfb.so.${LIBbfb_VERSION}
-...@lib lib/libcobexbfb.so.${LIBcobexbfb_VERSION}
+...@lib lib/libmulticobex.so.${LIBmulticobex_VERSION}
@lib lib/libobexftp.so.${LIBobexftp_VERSION}
+lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/obexftp.so
+libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/OBEXFTP/OBEXFTP.so
diff -urN /usr/ports/comms/obexftp/pkg/PLIST comms/obexftp/pkg/PLIST
--- /usr/ports/comms/obexftp/pkg/PLIST Fri Nov 12 09:06:54 2004
+++ comms/obexftp/pkg/PLIST Sun Oct 5 19:02:39 2008
@@ -1,20 +1,32 @@
-...@comment $OpenBSD: PLIST,v 1.1.1.1 2004/11/12 08:06:54 grange Exp $
+...@comment $OpenBSD$
%%SHARED%%
-bin/obexftp
-bin/obexftpd
+...@bin bin/obexftp
+...@bin bin/obexftpd
include/bfb/
include/bfb/bfb.h
include/bfb/bfb_io.h
-include/cobexbfb/
-include/cobexbfb/cobex_bfb.h
+include/multicobex/
+include/multicobex/multi_cobex.h
include/obexftp/
include/obexftp/client.h
include/obexftp/obexftp.h
include/obexftp/object.h
+include/obexftp/uuid.h
lib/libbfb.a
lib/libbfb.la
-lib/libcobexbfb.a
-lib/libcobexbfb.la
+lib/libmulticobex.a
+lib/libmulticobex.la
lib/libobexftp.a
lib/libobexftp.la
+lib/pkgconfig/
+lib/pkgconfig/obexftp.pc
+libdata/perl5/${MACHINE_ARCH}-openbsd/
+libdata/perl5/${MACHINE_ARCH}-openbsd/5.10.0/
+libdata/perl5/${MACHINE_ARCH}-openbsd/5.10.0/perllocal.pod
+libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/
+libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/OBEXFTP.pm
+libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/
+libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/OBEXFTP/
+libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/OBEXFTP/OBEXFTP.bs
@man man/man1/obexftp.1
+...@man man/man1/obexftpd.1
==== END ====