Fufu Fang
d7086c6ecf
Now clear the link->cache_ptr after closing the cache
2021-09-02 16:24:55 +01:00
Fufu Fang
b96ed88bec
improved debug statements
2021-09-02 16:07:39 +01:00
Fufu Fang
2d42313e8f
compiles, but not running properly
2021-09-02 15:36:53 +01:00
Fufu Fang
31f8509f42
moved the *sonic related fields into a separate struct
2021-09-01 21:29:13 +01:00
Fufu Fang
e7f06285df
improved Makefile, fixed potential memory leak at Data_create
2021-09-01 12:34:53 +01:00
Fufu Fang
86003d2b6a
Meta_create() now calls fclose itself
2021-09-01 12:19:20 +01:00
Fufu Fang
8f9935ee5d
moved cache_opened to cache.h
2021-09-01 10:39:33 +01:00
Fufu Fang
3c7e79089b
changed error handling for empty file
2021-08-31 18:54:58 +01:00
Fufu Fang
5e87ac92b0
Change error handling in cache.c, Updated Changelog.md
2021-08-31 18:49:49 +01:00
Fufu Fang
f42264d3c3
Added single file mode
...
Implemented feature request
https://github.com/fangfufu/httpdirfs/issues/86
2021-08-31 13:52:25 +01:00
Fufu Fang
e02042cade
improved logging
2021-08-31 11:50:59 +01:00
Fufu Fang
45d8cb8136
changed indentation style
2021-08-31 11:18:39 +01:00
Fufu Fang
f791ceb308
shortened error log format, changed indentation style
2021-08-31 11:15:00 +01:00
Fufu Fang
7b6277cb3d
now check for the invalid CONFIG.mode
2021-08-31 00:23:50 +01:00
Fufu Fang
81ed433182
changed some comments and indentation
2021-08-31 00:13:17 +01:00
Fufu Fang
510969a780
fixed deadlock
2021-08-30 11:55:04 +01:00
Fufu Fang
0f3cc61875
relabelled all log outputs
2021-08-30 11:24:32 +01:00
Fufu Fang
0219d7460a
only network.c needs to be cleaned up
2021-08-30 05:17:15 +01:00
Fufu Fang
2a4c61477a
clean up lprintf statements - we have link.c and network.c left.
2021-08-30 03:43:45 +01:00
Fufu Fang
7813487c50
improved error message, removed unnecessary locks
2021-08-30 02:50:03 +01:00
Fufu Fang
14c4b3b486
updated logging facility
2021-08-29 22:46:24 +01:00
Fufu Fang
f37cdefa47
Various changes
...
- Rather than using a flag to indicate operating mode, now we use
a variable.
- Change log printing level names
- Change the return for Cache_exist
2021-08-29 14:07:22 +01:00
Fufu Fang
4bf5631714
Revert 60b885181a
...
It breaks the cache system completely.
2021-08-29 10:52:49 +01:00
Fufu Fang
6d5267089f
improved debug messages
2021-08-22 02:26:09 +01:00
Fufu Fang
67ec1ad7e5
Separated out config.c and config.h
2021-08-22 00:51:37 +01:00
Fufu Fang
89df992053
fixed errorneous error handling
2021-08-21 02:40:20 +01:00
MecryWork
33bbd21e9f
Fix memory overflow
...
Co-authored-by: MecryWork
2021-08-12 13:28:37 +01:00
MecryWork
60b885181a
fix: Seg_exist function crashes when the second parameter is 0
...
Co-authored-by: liuchenghao
2021-08-09 10:36:09 +01:00
Fufu Fang
8e6ff1a93d
replaced calloc with CALLOC wrapper function
2021-08-08 14:25:24 +01:00
liuchenghao
2791f96603
fix: Failed to mount an empty file in the cache state
2021-07-27 15:55:19 +08:00
Fufu Fang
55ad0cd9fc
converted sonic_id to a string, to support epoupon LMS
2019-10-28 01:09:55 +00:00
Fufu Fang
ff1d34855c
Sonic ID3 mode is now working properly, but Sonic index mode stopped working
2019-10-27 21:21:30 +00:00
Fufu Fang
cf1d46edf4
fixed regression - cache system stopped working on regular http server
...
updated readme / help
Update README.md
Update README.md
2019-10-24 02:38:59 +01:00
Fufu Fang
f3d5ffc3fc
now cache works on subsonic server
2019-10-24 02:15:05 +01:00
Fufu Fang
a8ef8c88b5
added code to check if the server supports range requests
2019-10-24 00:44:18 +01:00
Fufu Fang
5062f511bd
Finished writing the code to generate Subsonic LinkTable
...
- Also refactored various bits and pieces
2019-10-23 21:04:25 +01:00
Fufu Fang
1a9c10f783
more changes to the subsonic module
...
completed sonic_gen_auth_str()
completed sonic_gen_url_first_part()
change calloc to CALLOC (the wrapper function with error handling)
2019-10-21 23:12:02 +01:00
Fufu Fang
bc23ee03a2
Fixed regression: LinkTable caching now works again.
2019-09-04 19:53:11 +01:00
Fufu Fang
c7dfa241d4
Backtrace will now be printed when the program crashes
...
- Note that static functions are not included in the printed backtrace.
2019-09-03 14:53:32 +01:00
Fufu Fang
765f4e00d0
Updated Makefile, fixed issue #44
...
- When header files get changed, the relevant object will get recompiled.
2019-09-02 17:56:23 +01:00
Fufu Fang
ee397d1513
Data_read() no longer gives warning messages when reaching the end of the cache file.
2019-09-02 16:51:42 +01:00
Fufu Fang
4c0b7da34b
stop the background download thread from pre-fetching beyond EOF
2019-09-02 16:05:55 +01:00
Fufu Fang
eb463478a8
The background download thread is being spawned again.
2019-09-02 15:47:10 +01:00
Fufu Fang
6c8a15d8cc
Fixed buffer over-read at the boundary.
...
- Say we are using a lock size of 1024k, we send a request for 128k at 1008k. It won't trigger the download, because we already download 1024k at 0. So it would read off from the empty disk space!
- This problem only occurs during the first time you download a file. During subsequent accesses, when you are only reading from the cache, this problem does not occur.
2019-09-02 15:19:41 +01:00
Fufu Fang
9e3e4747ae
fixed Cache_bgdl()
...
- Cache_bgdl() used to corrupt the cache file
2019-09-02 09:04:20 +01:00
Fufu Fang
ed5457c76f
Bugfix: partially fixed the cache lock
...
- now when the same file is opened twice, the fread() output is consistent.
2019-09-01 11:39:47 +01:00
Fufu Fang
20f30a0e38
Tidied up some of the comments and formatting
2019-09-01 08:52:18 +01:00
Fufu Fang
1a44a4d960
Wrapped mutex locking and unlocking functions in error checking macro
2019-09-01 01:21:40 +01:00
Fufu Fang
92a9658c66
Cache system bug fix
...
- Now keep track of the number of times a file has been opened. The on-disk
cache file no longer gets opened multiple times, if a file is opened multiple
times.
2019-09-01 00:43:50 +01:00
Fufu Fang
afb2a8fe6c
Directory listing performance improvement while file transfers are going on
...
- Added a LinkTable generation priority lock
- This allows LinkTable generation to be run exclusively. This
effectively gives LinkTable generation priority over file transfer.
2019-08-31 21:21:28 +01:00