Ich hab einen Patch von den Änderungen an djmount gemacht, evtl kann das ja ins BS ?
Code: Alles auswählen
diff -urNp djmount-0.71/djmount/file_buffer.c djmount-0.71_patched/djmount/file_buffer.c
--- djmount-0.71/djmount/file_buffer.c 2006-08-27 22:12:20.000000000 +0200
+++ djmount-0.71_patched/djmount/file_buffer.c 2012-11-29 08:55:26.000000000 +0100
@@ -199,7 +199,7 @@ FileBuffer_Read (FileBuffer* file, char*
int rc = UpnpOpenHttpGetEx (file->url, &handle,
&contentType, &contentLength,
&httpStatus,
- offset, offset + size,
+ offset, offset + size -1,
HTTP_DEFAULT_TIMEOUT
);
if (rc != UPNP_E_SUCCESS)
diff -urNp djmount-0.71/djmount/file_buffer.h djmount-0.71_patched/djmount/file_buffer.h
--- djmount-0.71/djmount/file_buffer.h 2006-08-27 22:12:20.000000000 +0200
+++ djmount-0.71_patched/djmount/file_buffer.h 2012-11-29 09:12:49.000000000 +0100
@@ -60,7 +60,7 @@ typedef struct _FileBuffer FileBuffer;
*
*****************************************************************************/
-#define FILE_BUFFER_MAX_CONTENT_LENGTH ((uintmax_t) INT_MAX)
+#define FILE_BUFFER_MAX_CONTENT_LENGTH ((uintmax_t) ~0ULL)
/*****************************************************************************
diff -urNp djmount-0.71/djmount/media_file.c djmount-0.71_patched/djmount/media_file.c
--- djmount-0.71/djmount/media_file.c 2006-08-27 22:12:20.000000000 +0200
+++ djmount-0.71_patched/djmount/media_file.c 2012-11-29 09:32:36.000000000 +0100
@@ -282,7 +282,7 @@ MediaFile_GetResSize (const MediaFile* c
{
const char* const str = ixmlElement_getAttribute (file->res, "size");
off_t res;
- STRING_TO_INT (str, res, -1);
+ STRING_TO_INT (str, res, 8ULL * 1024 * 1024 * 1024);
return res;
}
diff -urNp djmount-0.71/libupnp/upnp/inc/upnp.h djmount-0.71_patched/libupnp/upnp/inc/upnp.h
--- djmount-0.71/libupnp/upnp/inc/upnp.h 2006-08-27 22:12:30.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/inc/upnp.h 2012-11-29 09:18:45.000000000 +0100
@@ -2262,9 +2262,9 @@ int UpnpOpenHttpGetEx(
IN OUT int *httpStatus, /** The status returned on receiving a
response message from the remote
server. */
- IN int lowRange, /** An integer value representing the low
+ IN unsigned long long lowRange, /** An integer value representing the low
end of a range to retrieve. */
- IN int highRange, /** An integer value representing the high
+ IN unsigned long long highRange, /** An integer value representing the high
end of a range to retrieve. */
IN int timeout /** A time out value sent with the request
during which a response is expected
diff -urNp djmount-0.71/libupnp/upnp/src/api/upnpapi.c djmount-0.71_patched/libupnp/upnp/src/api/upnpapi.c
--- djmount-0.71/libupnp/upnp/src/api/upnpapi.c 2006-08-27 22:12:26.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/src/api/upnpapi.c 2012-11-29 09:21:22.000000000 +0100
@@ -3117,8 +3117,8 @@ UpnpOpenHttpGetEx( IN const char *url_st
IN OUT char **contentType,
OUT int *contentLength,
OUT int *httpStatus,
- IN int lowRange,
- IN int highRange,
+ IN unsigned long long lowRange,
+ IN unsigned long long highRange,
IN int timeout )
{
return http_OpenHttpGetEx( url_str,
diff -urNp djmount-0.71/libupnp/upnp/src/genlib/net/http/httpreadwrite.c djmount-0.71_patched/libupnp/upnp/src/genlib/net/http/httpreadwrite.c
--- djmount-0.71/libupnp/upnp/src/genlib/net/http/httpreadwrite.c 2006-08-27 22:12:24.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/src/genlib/net/http/httpreadwrite.c 2012-11-29 09:24:39.000000000 +0100
@@ -2072,8 +2072,8 @@ http_OpenHttpGetEx( IN const char *url_s
IN OUT char **contentType,
OUT int *contentLength,
OUT int *httpStatus,
- IN int lowRange,
- IN int highRange,
+ IN unsigned long long lowRange,
+ IN unsigned long long highRange,
IN int timeout )
{
int http_error_code;
@@ -2107,7 +2107,7 @@ http_OpenHttpGetEx( IN const char *url_s
}
memset( &rangeBuf, 0, sizeof( rangeBuf ) );
- sprintf( rangeBuf.RangeHeader, "Range: bytes=%d-%d\r\n",
+ sprintf( rangeBuf.RangeHeader, "Range: bytes=%llu-%llu\r\n",
lowRange, highRange );
membuffer_init( &request );
diff -urNp djmount-0.71/libupnp/upnp/src/inc/httpreadwrite.h djmount-0.71_patched/libupnp/upnp/src/inc/httpreadwrite.h
--- djmount-0.71/libupnp/upnp/src/inc/httpreadwrite.h 2006-08-27 22:12:28.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/src/inc/httpreadwrite.h 2012-11-29 09:25:41.000000000 +0100
@@ -494,8 +494,8 @@ int http_OpenHttpGetEx(IN const char *ur
IN OUT char **contentType,
OUT int *contentLength,
OUT int *httpStatus,
- IN int lowRange,
- IN int highRange,
+ IN unsigned long long lowRange,
+ IN unsigned long long highRange,
IN int timeout);
/************************************************************************