Merge of patch submitted By Keith Brindley - brindlk
SF Bug Tracker [ 1762758 ] Seek not working for large files. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@214 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
		
							
								
								
									
										16
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								ChangeLog
									
									
									
									
									
								
							| @@ -2,6 +2,22 @@ | ||||
| Version 1.6.0 | ||||
| ******************************************************************************* | ||||
|  | ||||
| 2007-08-06 Marcelo Jimenez <mroberto(at)users.sourceforge.net> | ||||
| 	* Merge of patch submitted By Keith Brindley - brindlk | ||||
| 	SF Bug Tracker [ 1762758 ] Seek not working for large files | ||||
| 	Problem: | ||||
| 	Requests from the uPnP client to seek to a position beyond 2GB in a large | ||||
| 	file are handled as a request to see from the 2GB point. | ||||
|  | ||||
| 	Impact: | ||||
| 	Varies depending on client. The Xbox 360 kills the connection when it | ||||
| 	realises. | ||||
|  | ||||
| 	Solution: | ||||
| 	GetNextRange function (webserver.c) is updated to handle large file sizes. | ||||
| 	Fix should also recognise when built on a 32bit platform rather than 64 and | ||||
| 	handle accordingly. | ||||
|  | ||||
| 2007-08-05 Marcelo Jimenez <mroberto(at)users.sourceforge.net> | ||||
| 	* Merge of Mac OS X patch from St<53>phane Corth<74>sy (davelopper), | ||||
| 	SF Bug Tracker [ 1686420 ] Modifications for MacOSX. | ||||
|   | ||||
							
								
								
									
										1
									
								
								THANKS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								THANKS
									
									
									
									
									
								
							| @@ -20,6 +20,7 @@ exempt of errors. | ||||
| - Jiri Zouhar | ||||
| - John Dennis | ||||
| - Jonathan (no_dice) | ||||
| - Keith Brindley | ||||
| - Leuk_He | ||||
| - Loigu | ||||
| - Luke Kim | ||||
|   | ||||
| @@ -953,7 +953,7 @@ GetDescDocumentAndURL( IN Upnp_DescType descriptionType, | ||||
|     char *temp_str = NULL; | ||||
|     FILE *fp = NULL; | ||||
|     off_t fileLen; | ||||
|     unsigned num_read; | ||||
|     size_t num_read; | ||||
|     time_t last_modified; | ||||
|     struct stat file_info; | ||||
|     struct sockaddr_in serverAddr; | ||||
|   | ||||
| @@ -880,22 +880,24 @@ GetNextRange( char **SrcRangeStr, | ||||
|               off_t *FirstByte, | ||||
|               off_t *LastByte ) | ||||
| { | ||||
|     char *Ptr, | ||||
|      *Tok; | ||||
|     int i, | ||||
|       F = -1, | ||||
|       L = -1; | ||||
|     char *Ptr; | ||||
|     char *Tok; | ||||
|     int i; | ||||
|     int64_t F = -1; | ||||
|     int64_t L = -1; | ||||
|     int Is_Suffix_byte_Range = 1; | ||||
|  | ||||
|     if( *SrcRangeStr == NULL ) | ||||
|     if( *SrcRangeStr == NULL ) { | ||||
|         return -1; | ||||
|     } | ||||
|  | ||||
|     Tok = StrTok( SrcRangeStr, "," ); | ||||
|  | ||||
|     if( ( Ptr = strstr( Tok, "-" ) ) == NULL ) | ||||
|     if( ( Ptr = strstr( Tok, "-" ) ) == NULL ) { | ||||
|         return -1; | ||||
|     } | ||||
|     *Ptr = ' '; | ||||
|     sscanf( Tok, "%d%d", &F, &L ); | ||||
|     sscanf( Tok, "%"SCNd64"%"SCNd64, &F, &L ); | ||||
|  | ||||
|     if( F == -1 || L == -1 ) { | ||||
|         *Ptr = '-'; | ||||
| @@ -910,16 +912,15 @@ GetNextRange( char **SrcRangeStr, | ||||
|         } | ||||
|  | ||||
|         if( Is_Suffix_byte_Range ) { | ||||
|             *FirstByte = L; | ||||
|             *LastByte = F; | ||||
|             *FirstByte = (off_t)L; | ||||
|             *LastByte = (off_t)F; | ||||
|             return 1; | ||||
|         } | ||||
|     } | ||||
|     *FirstByte = (off_t)F; | ||||
|     *LastByte = (off_t)L; | ||||
|  | ||||
|     *FirstByte = F; | ||||
|     *LastByte = L; | ||||
|     return 1; | ||||
|  | ||||
| } | ||||
|  | ||||
| /************************************************************************ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marcelo Roberto Jimenez
					Marcelo Roberto Jimenez