Rename endpoint_type to transfer_type

Matches the USB specs more closely
diff --git a/libusb/sync.c b/libusb/sync.c
index 3cfd013..dd8e253 100644
--- a/libusb/sync.c
+++ b/libusb/sync.c
@@ -135,7 +135,7 @@
 
 static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
 	unsigned char endpoint, unsigned char *buffer, int length,
-	int *transferred, unsigned int timeout, unsigned char endpoint_type)
+	int *transferred, unsigned int timeout, unsigned char type)
 {
 	struct libusb_transfer *transfer = libusb_alloc_transfer(0);
 	int completed = 0;
@@ -146,7 +146,7 @@
 
 	libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length,
 		bulk_transfer_cb, &completed, timeout);
-	transfer->endpoint_type = endpoint_type;
+	transfer->type = type;
 
 	r = libusb_submit_transfer(transfer);
 	if (r < 0) {
@@ -224,7 +224,7 @@
 	unsigned int timeout)
 {
 	return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
-		transferred, timeout, LIBUSB_ENDPOINT_TYPE_BULK);
+		transferred, timeout, LIBUSB_TRANSFER_TYPE_BULK);
 }
 
 /** \ingroup syncio
@@ -269,6 +269,6 @@
 	unsigned char *data, int length, int *transferred, unsigned int timeout)
 {
 	return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
-		transferred, timeout, LIBUSB_ENDPOINT_TYPE_INTERRUPT);
+		transferred, timeout, LIBUSB_TRANSFER_TYPE_INTERRUPT);
 }