Hello community,
here is the log from the commit of package libmtp
checked in at Wed Jan 17 11:35:22 CET 2007.
--------
--- libmtp/libmtp.changes 2007-01-10 10:59:56.000000000 +0100
+++ /mounts/work_src_done/STABLE/libmtp/libmtp.changes 2007-01-17 11:28:30.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Jan 17 11:28:17 CET 2007 - meissner@suse.de
+
+- upstream 0.1.3
+ - bugfixes.
+
+-------------------------------------------------------------------
Old:
----
libmtp-0.1.2.tar.bz2
New:
----
libmtp-0.1.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libmtp.spec ++++++
--- /var/tmp/diff_new_pack.j12578/_old 2007-01-17 11:35:13.000000000 +0100
+++ /var/tmp/diff_new_pack.j12578/_new 2007-01-17 11:35:13.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package libmtp (Version 0.1.2)
+# spec file for package libmtp (Version 0.1.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -18,8 +18,8 @@
Autoreqprov: on
Requires: libusb
Summary: Access to MTP Players
-Version: 0.1.2
-Release: 2
+Version: 0.1.3
+Release: 1
Source0: %name-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -73,6 +73,9 @@
/usr/share/hal/fdi/information/20thirdparty/10-usb-music-players-libmtp.fdi
%changelog -n libmtp
+* Wed Jan 17 2007 - meissner@suse.de
+- upstream 0.1.3
+ - bugfixes.
* Wed Jan 10 2007 - meissner@suse.de
- use %%run_ldconfig in post/postun. (from rpmlint)
* Mon Jan 08 2007 - meissner@suse.de
++++++ libmtp-0.1.2.tar.bz2 -> libmtp-0.1.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/ChangeLog new/libmtp-0.1.3/ChangeLog
--- old/libmtp-0.1.2/ChangeLog 2007-01-08 15:47:13.000000000 +0100
+++ new/libmtp-0.1.3/ChangeLog 2007-01-16 22:38:39.000000000 +0100
@@ -1,3 +1,28 @@
+2007-01-16 Linus Walleij
+
+ * configure.ac: bump and release 0.1.3.
+ * src/Makefile.am: bump interface REVISION. Nothing changed
+ externally really.
+
+2007-01-11 Linus Walleij
+
+ * src/libmtp.sym: updated symbol table for mingw32 but does
+ anyone use this? Also I believe one could auto-generate
+ this some way, just haven't figured out how... Perhaps with
+ a funky script that massage libmtp.h if nothing else.
+
+2007-01-11 Richard Low
+
+ * src/libusb-glue.c: a zero read fix
+ * src/libmtp.c: fix spelling mistake
+
+2007-01-09 Linus Walleij
+
+ * src/libusb-glue.c: repair callbacks, structure the code just
+ a little bit.
+ * src/libmtp.c: don't assign values to writes or reads, use the
+ PTP transport intrinsics instead.
+
2007-01-07 Orson Teodoro
* src/ptp.h: Encoding profile.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/configure new/libmtp-0.1.3/configure
--- old/libmtp-0.1.2/configure 2007-01-03 12:56:44.000000000 +0100
+++ new/libmtp-0.1.3/configure 2007-01-16 22:38:55.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for libmtp 0.1.2.
+# Generated by GNU Autoconf 2.60 for libmtp 0.1.3.
#
# Report bugs to .
#
@@ -713,8 +713,8 @@
# Identity of this package.
PACKAGE_NAME='libmtp'
PACKAGE_TARNAME='libmtp'
-PACKAGE_VERSION='0.1.2'
-PACKAGE_STRING='libmtp 0.1.2'
+PACKAGE_VERSION='0.1.3'
+PACKAGE_STRING='libmtp 0.1.3'
PACKAGE_BUGREPORT='libmtp-users@lists.sourceforge.net'
ac_unique_file="src/libmtp.c"
@@ -1383,7 +1383,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libmtp 0.1.2 to adapt to many kinds of systems.
+\`configure' configures libmtp 0.1.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1453,7 +1453,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libmtp 0.1.2:";;
+ short | recursive ) echo "Configuration of libmtp 0.1.3:";;
esac
cat <<\_ACEOF
@@ -1554,7 +1554,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libmtp configure 0.1.2
+libmtp configure 0.1.3
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1568,7 +1568,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libmtp $as_me 0.1.2, which was
+It was created by libmtp $as_me 0.1.3, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2238,7 +2238,7 @@
# Define the identity of the package.
PACKAGE='libmtp'
- VERSION='0.1.2'
+ VERSION='0.1.3'
cat >>confdefs.h <<_ACEOF
@@ -23416,7 +23416,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libmtp $as_me 0.1.2, which was
+This file was extended by libmtp $as_me 0.1.3, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23469,7 +23469,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-libmtp config.status 0.1.2
+libmtp config.status 0.1.3
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/configure.ac new/libmtp-0.1.3/configure.ac
--- old/libmtp-0.1.2/configure.ac 2007-01-03 12:56:10.000000000 +0100
+++ new/libmtp-0.1.3/configure.ac 2007-01-16 22:38:39.000000000 +0100
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([libmtp], [0.1.2], [libmtp-users@lists.sourceforge.net])
+AC_INIT([libmtp], [0.1.3], [libmtp-users@lists.sourceforge.net])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/libmtp.c])
AM_CONFIG_HEADER(config.h)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/libmtp.pc new/libmtp-0.1.3/libmtp.pc
--- old/libmtp-0.1.2/libmtp.pc 2007-01-03 12:57:04.000000000 +0100
+++ new/libmtp-0.1.3/libmtp.pc 2007-01-16 22:39:17.000000000 +0100
@@ -7,7 +7,7 @@
Name: libmtp
Description: libmtp is a library for accessing Media Transfer Protocol devices
-Version: 0.1.2
+Version: 0.1.3
Requires: libusb
Conflicts:
Libs: -L${libdir} -lmtp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/src/libmtp.c new/libmtp-0.1.3/src/libmtp.c
--- old/libmtp-0.1.2/src/libmtp.c 2007-01-03 12:56:13.000000000 +0100
+++ new/libmtp-0.1.3/src/libmtp.c 2007-01-12 12:29:19.000000000 +0100
@@ -1304,7 +1304,7 @@
ret = ptp_getdevicepropvalue(params, PTP_DPC_BatteryLevel, &propval, PTP_DTC_UINT8);
if (ret != PTP_RC_OK) {
- printf("LIBMTP_Get_Batterylevel(): could not get devcie property value.\n");
+ printf("LIBMTP_Get_Batterylevel(): could not get device property value.\n");
printf("Return code: 0x%04x (look this up in ptp.h for an explanation).\n", ret);
return -1;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/src/libmtp.h new/libmtp-0.1.3/src/libmtp.h
--- old/libmtp-0.1.2/src/libmtp.h 2007-01-03 12:57:03.000000000 +0100
+++ new/libmtp-0.1.3/src/libmtp.h 2007-01-16 22:39:17.000000000 +0100
@@ -10,7 +10,7 @@
#ifndef LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_H_INCLUSION_GUARD
-#define LIBMTP_VERSION 0.1.2
+#define LIBMTP_VERSION 0.1.3
/* This handles MSVC pecularities */
#ifdef _MSC_VER
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/src/libmtp.sym new/libmtp-0.1.3/src/libmtp.sym
--- old/libmtp-0.1.2/src/libmtp.sym 2006-02-27 09:58:11.000000000 +0100
+++ new/libmtp-0.1.3/src/libmtp.sym 2007-01-12 12:29:19.000000000 +0100
@@ -1,15 +1,62 @@
LIBMTP_Init
+LIBMTP_Get_Supported_Devices_List
+LIBMTP_Detect_Descriptor
LIBMTP_Get_First_Device
LIBMTP_Release_Device
-LIBMTP_Get_Ownername
-LIBMTP_Get_Storageinfo
+LIBMTP_Dump_Device_Info
+LIBMTP_Get_Modelname
+LIBMTP_Get_Serialnumber
+LIBMTP_Get_Deviceversion
+LIBMTP_Get_Friendlyname
+LIBMTP_Set_Friendlyname
+LIBMTP_Get_Syncpartner
+LIBMTP_Set_Syncpartner
LIBMTP_Get_Batterylevel
+LIBMTP_Get_Secure_Time
+LIBMTP_Get_Device_Certificate
+LIBMTP_Get_Supported_Filetypes
+LIBMTP_Get_Storage
+LIBMTP_Format_Storage
+LIBMTP_new_file_t
+LIBMTP_destroy_file_t
+LIBMTP_Get_Filetype_Description
+LIBMTP_Get_Filelisting
+LIBMTP_Get_Filelisting_With_Callback
+LIBMTP_Get_Filemetadata
+LIBMTP_Get_File_To_File
+LIBMTP_Get_File_To_File_Descriptor
+LIBMTP_Send_File_From_File
+LIBMTP_Send_File_From_File_Descriptor
+LIBMTP_new_filesampledata_t
+LIBMTP_destroy_filesampledata_t
+LIBMTP_Get_Representative_Sample_Format
+LIBMTP_Send_Representative_Sample
LIBMTP_new_track_t
LIBMTP_destroy_track_t
LIBMTP_Get_Tracklisting
+LIBMTP_Get_Tracklisting_With_Callback
+LIBMTP_Get_Trackmetadata
LIBMTP_Get_Track_To_File
LIBMTP_Get_Track_To_File_Descriptor
LIBMTP_Send_Track_From_File
LIBMTP_Send_Track_From_File_Descriptor
LIBMTP_Update_Track_Metadata
-LIBMTP_Delete_Track
+LIBMTP_Track_Exists
+LIBMTP_new_folder_t
+LIBMTP_destroy_folder_t
+LIBMTP_Get_Folder_List
+LIBMTP_Find_Folder
+LIBMTP_Create_Folder
+LIBMTP_new_playlist_t
+LIBMTP_destroy_playlist_t
+LIBMTP_Get_Playlist_List
+LIBMTP_Get_Playlist
+LIBMTP_Create_New_Playlist
+LIBMTP_Update_Playlist
+LIBMTP_new_album_t
+LIBMTP_destroy_album_t
+LIBMTP_Get_Album_List
+LIBMTP_Get_Album
+LIBMTP_Create_New_Album
+LIBMTP_Update_Album
+LIBMTP_Delete_Object
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/src/libusb-glue.c new/libmtp-0.1.3/src/libusb-glue.c
--- old/libmtp-0.1.2/src/libusb-glue.c 2007-01-08 15:47:14.000000000 +0100
+++ new/libmtp-0.1.3/src/libusb-glue.c 2007-01-12 12:29:19.000000000 +0100
@@ -227,7 +227,7 @@
static void clear_stall(PTP_USB* ptp_usb);
static int init_ptp_usb (PTPParams* params, PTP_USB* ptp_usb, struct usb_device* dev);
static short ptp_write_func (unsigned long,PTPDataHandler*,void *data,unsigned long*);
-static short ptp_read_func (unsigned long,PTPDataHandler*,void *data,unsigned long*);
+static short ptp_read_func (unsigned long,PTPDataHandler*,void *data,unsigned long*,int);
static int usb_clear_stall_feature(PTP_USB* ptp_usb, int ep);
static int usb_get_endpoint_status(PTP_USB* ptp_usb, int ep, uint16_t* status);
@@ -454,7 +454,8 @@
static short
ptp_read_func (
unsigned long size, PTPDataHandler *handler,void *data,
- unsigned long *readbytes
+ unsigned long *readbytes,
+ int readzero
) {
PTP_USB *ptp_usb = (PTP_USB *)data;
unsigned long toread = 0;
@@ -467,43 +468,59 @@
bytes = malloc(CONTEXT_BLOCK_SIZE);
while (curread < size) {
toread = size - curread;
- if (toread > CONTEXT_BLOCK_SIZE)
+ if (toread > CONTEXT_BLOCK_SIZE) {
toread = CONTEXT_BLOCK_SIZE;
- else if (toread > ptp_usb->outep_maxpacket)
+ } else if (toread > ptp_usb->outep_maxpacket) {
toread -= toread % ptp_usb->outep_maxpacket;
+ }
result = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, (char*)bytes, toread, ptpcam_usb_timeout);
- if (result == 0) {
- result = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, (char*)bytes, toread, ptpcam_usb_timeout);
- }
- if (result < 0)
+
+ if (result < 0) {
return PTP_ERROR_IO;
+ }
#ifdef ENABLE_USB_BULK_DEBUG
printf("<==USB IN\n");
- data_dump_ascii (stdout,bytes,result,16);
+ if (result == 0)
+ printf("Zero Read\n");
+ else
+ data_dump_ascii (stdout,bytes,result,16);
#endif
- handler->putfunc (NULL, handler->private, result, bytes, &written);
+ handler->putfunc(NULL, handler->private, result, bytes, &written);
+ ptp_usb->current_transfer_complete += result;
curread += result;
+
+ // Increase counters, call callback
+ if (ptp_usb->callback_active) {
+ if (ptp_usb->current_transfer_complete >= ptp_usb->current_transfer_total) {
+ // send last update and disable callback.
+ ptp_usb->current_transfer_complete = ptp_usb->current_transfer_total;
+ ptp_usb->callback_active = 0;
+ }
+ if (ptp_usb->current_transfer_callback != NULL) {
+ (void) ptp_usb->current_transfer_callback(ptp_usb->current_transfer_complete,
+ ptp_usb->current_transfer_total,
+ ptp_usb->current_transfer_callback_data);
+ }
+ }
+
if (result < toread) /* short reads are common */
break;
}
if (readbytes) *readbytes = curread;
free (bytes);
-
- // Increase counters, call callback
- if (ptp_usb->callback_active) {
- ptp_usb->current_transfer_complete += curread;
- if (ptp_usb->current_transfer_complete > ptp_usb->current_transfer_total) {
- // Fishy... but some commands have unpredictable lengths.
- // send last update and disable callback.
- ptp_usb->current_transfer_complete = ptp_usb->current_transfer_total;
- ptp_usb->callback_active = 0;
- }
- if (ptp_usb->current_transfer_callback != NULL) {
- (void) ptp_usb->current_transfer_callback(ptp_usb->current_transfer_complete,
- ptp_usb->current_transfer_total,
- ptp_usb->current_transfer_callback_data);
- }
+
+ // there might be a zero packet waiting for us...
+ if (readzero && curread % ptp_usb->outep_maxpacket == 0) {
+ char temp;
+ int zeroresult = 0;
+#ifdef ENABLE_USB_BULK_DEBUG
+ printf("<==USB IN\n");
+ printf("Zero Read\n");
+#endif
+ zeroresult = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, &temp, 0, ptpcam_usb_timeout);
+ if (zeroresult != 0)
+ printf("LIBMTP panic: unable to read in zero packet, response 0x%04x", zeroresult);
}
if (result > 0) {
@@ -528,47 +545,54 @@
// This is the largest block we'll need to read in.
bytes = malloc(CONTEXT_BLOCK_SIZE);
- if (!bytes) return PTP_ERROR_IO;
+ if (!bytes) {
+ return PTP_ERROR_IO;
+ }
while (curwrite < size) {
towrite = size-curwrite;
- if (towrite > CONTEXT_BLOCK_SIZE)
+ if (towrite > CONTEXT_BLOCK_SIZE) {
towrite = CONTEXT_BLOCK_SIZE;
- else
- if (towrite > ptp_usb->outep_maxpacket && towrite % ptp_usb->outep_maxpacket != 0)
+ } else {
+ // This magic makes packets the same size that WMP send them.
+ if (towrite > ptp_usb->outep_maxpacket && towrite % ptp_usb->outep_maxpacket != 0) {
towrite -= towrite % ptp_usb->outep_maxpacket;
- handler->getfunc (NULL, handler->private,towrite,bytes,&towrite);
+ }
+ }
+ handler->getfunc(NULL, handler->private,towrite,bytes,&towrite);
result = USB_BULK_WRITE(ptp_usb->handle,ptp_usb->outep,(char*)bytes,towrite,ptpcam_usb_timeout);
#ifdef ENABLE_USB_BULK_DEBUG
printf("USB OUT==>\n");
data_dump_ascii (stdout,bytes,towrite,16);
#endif
- if (result < 0)
+ if (result < 0) {
return PTP_ERROR_IO;
+ }
+ // Increase counters
+ ptp_usb->current_transfer_complete += result;
curwrite += result;
+
+ // call callback
+ if (ptp_usb->callback_active) {
+ if (ptp_usb->current_transfer_complete >= ptp_usb->current_transfer_total) {
+ // send last update and disable callback.
+ ptp_usb->current_transfer_complete = ptp_usb->current_transfer_total;
+ ptp_usb->callback_active = 0;
+ }
+ if (ptp_usb->current_transfer_callback != NULL) {
+ (void) ptp_usb->current_transfer_callback(ptp_usb->current_transfer_complete,
+ ptp_usb->current_transfer_total,
+ ptp_usb->current_transfer_callback_data);
+ }
+ }
if (result < towrite) /* short writes happen */
break;
}
free (bytes);
- if (written) *written = curwrite;
-
- // Increase counters
- ptp_usb->current_transfer_complete += curwrite;
-
- // call callback
- if (ptp_usb->callback_active) {
- if (ptp_usb->current_transfer_complete > ptp_usb->current_transfer_total) {
- // Fishy... but some commands have unpredictable lengths.
- // send last update and disable callback.
- ptp_usb->current_transfer_complete = ptp_usb->current_transfer_total;
- ptp_usb->callback_active = 0;
- }
- if (ptp_usb->current_transfer_callback != NULL) {
- (void) ptp_usb->current_transfer_callback(ptp_usb->current_transfer_complete,
- ptp_usb->current_transfer_total,
- ptp_usb->current_transfer_callback_data);
- }
+ if (written) {
+ *written = curwrite;
}
+
// If this is the last transfer send a zero write if required
if (ptp_usb->current_transfer_complete >= ptp_usb->current_transfer_total) {
if ((towrite % ptp_usb->outep_maxpacket) == 0) {
@@ -579,10 +603,7 @@
result=USB_BULK_WRITE(ptp_usb->handle,ptp_usb->outep,(char *)"x",0,ptpcam_usb_timeout);
}
}
-
- if (ptp_usb->current_transfer_complete == ptp_usb->current_transfer_total)
- ptp_usb->callback_active = 0;
-
+
if (result < 0)
return PTP_ERROR_IO;
return PTP_RC_OK;
@@ -812,7 +833,7 @@
return PTP_RC_OK;
}
ptp_init_recv_memory_handler (&memhandler);
- ret = ptp_read_func( sizeof(*packet), &memhandler, params->data, rlen);
+ ret = ptp_read_func( sizeof(*packet), &memhandler, params->data, rlen, 0);
ptp_exit_recv_memory_handler (&memhandler, &x, rlen);
if (x) {
memcpy (packet, x, *rlen);
@@ -856,7 +877,8 @@
PTP_USB_BULK_HS_MAX_PACKET_LEN,
handler,
params->data,
- &readdata
+ &readdata,
+ 0
);
if (xret == -1)
return PTP_ERROR_IO;
@@ -916,7 +938,7 @@
/* If not read the rest of it. */
ret=ptp_read_func(len - (rlen - PTP_USB_BULK_HDR_LEN),
handler,
- params->data, &rlen);
+ params->data, &rlen, 1);
if (ret!=PTP_RC_OK) {
ret = PTP_ERROR_IO;
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/src/Makefile.am new/libmtp-0.1.3/src/Makefile.am
--- old/libmtp-0.1.2/src/Makefile.am 2007-01-03 12:56:13.000000000 +0100
+++ new/libmtp-0.1.3/src/Makefile.am 2007-01-16 22:38:40.000000000 +0100
@@ -31,7 +31,7 @@
# ---------------------------------------------------------------------------
CURRENT=6
AGE=1
-REVISION=0
+REVISION=1
SOVERSION=$(CURRENT):$(REVISION):$(AGE)
if COMPILE_MINGW32
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libmtp-0.1.2/src/Makefile.in new/libmtp-0.1.3/src/Makefile.in
--- old/libmtp-0.1.2/src/Makefile.in 2007-01-03 12:56:43.000000000 +0100
+++ new/libmtp-0.1.3/src/Makefile.in 2007-01-16 22:38:53.000000000 +0100
@@ -226,7 +226,7 @@
# ---------------------------------------------------------------------------
CURRENT = 6
AGE = 1
-REVISION = 0
+REVISION = 1
SOVERSION = $(CURRENT):$(REVISION):$(AGE)
@COMPILE_MINGW32_TRUE@noinst_DATA = libmtp.lib
@COMPILE_MINGW32_TRUE@W32LF = -export-dynamic -no-undefined -export-symbols libmtp.sym
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org