Commit Graph

69 Commits

Author SHA1 Message Date
Fufu Fang 40c750fac9 moved the location of error string 2021-09-04 13:37:45 +01:00
Fufu Fang 67edcc906f Clean up for the master branch 2021-09-04 12:41:33 +01:00
Fufu Fang 5d539c30b1 started writing the ramcache 2021-09-04 01:28:01 +01:00
Fufu Fang 939e287c87 adjusted includes 2021-09-03 21:39:31 +01:00
Fufu Fang 6819ad09e4 removed unnecessary includes 2021-09-03 21:23:52 +01:00
Fufu Fang 1efe5932cf more refactoring 2021-09-03 16:58:08 +01:00
Fufu Fang ee32ddebc9 simplified network code 2021-09-03 16:36:50 +01:00
Fufu Fang dd8d887f94 more refactoring 2021-09-03 16:29:00 +01:00
Fufu Fang cd6bb5bee8 more refactoring 2021-09-03 14:56:11 +01:00
Fufu Fang 08eb04fb0e refactoring - now check return code from curl_easy_getinfo 2021-09-03 12:47:48 +01:00
Fufu Fang c64a139b46 refactoring transfer_blocking 2021-09-03 12:40:35 +01:00
Fufu Fang 31f8509f42 moved the *sonic related fields into a separate struct 2021-09-01 21:29:13 +01:00
Fufu Fang 464c8e4863 Merged transfer status struct and transfer data struct 2021-09-01 11:56:18 +01:00
Fufu Fang a76366c481 improved error handling in path_download 2021-09-01 11:03:27 +01:00
Fufu Fang 95b86825ed Added minimum transfer size in TransferDataStruct 2021-09-01 03:53:19 +01:00
Fufu Fang 08c1eeba49 added initial debug statements 2021-08-31 21:30:24 +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 0f3cc61875
relabelled all log outputs 2021-08-30 11:24:32 +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 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 4b02980380
Added --config flag, updated CHANGELOG.md 2019-10-28 01:45:13 +00: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 b7c63f4418
renamed MemoryStruct to DataStruct, removed spurious link type detection logic 2019-10-22 20:26:21 +01:00
Fufu Fang ed8452a4a3
factored out network / root link table initialisation code 2019-10-22 01:49:53 +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 1493190692
Improved HTTP temporary failure error handling
- Added HTTP response code for Cloudflare timeout
- Improved HTTP temporary failure error handling during LinkTable generation
- Now checked all HTTP response code in a single function
2019-09-04 18:42:59 +01:00
Fufu Fang 56e1095287
tidying stuff up 2019-09-04 17:43:30 +01:00
Fufu Fang aa4aae58b2
Added volatile into a variable, based on advice from andyhhp from SRCF.
[22:40] <andyhhp> curl_process_msgs()'s use of "static int slept" is dangerous and racy.  an optimising compiler can and probably will do bad things
[22:45] <ff266> with respect to "static int slept", should i just put a volatile in front of it? So "volatile static int slept"?
[22:46] <ff266> I meant "static volatile int slept;"
[22:47] <andyhhp> lets say yes for the sake of argument
[22:47] <andyhhp> "its complicated"
[22:47] <andyhhp> but that will broadly do what you want
2019-09-04 17:43:29 +01:00
Fufu Fang b6777c0478
Bugfix: No longer deadlock after encountering HTTP 429 while filling up a Linktable.
- Renamed some functions
- After initialise parse of the HTML file, files are no longer assigned as LINK_FILE. They are now assigned as LINK_UNINITIALISED_FILE.
- Link_req_file_stat() now crashes if the link type is other than LINK_UNINITIALISED_FILE.
2019-09-04 17:43:18 +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 e06ea6dc06
Wrapped mutex lock / unlock functions into function rather than macro 2019-09-01 21:36:58 +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 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
Fufu Fang d6fbcb4113 fixed issue #40
curl handles should NOT be added when there are transfers going on!!!
2019-08-31 08:10:36 +01:00
Fufu Fang 600f3c3fe5 added more documentation 2019-08-27 10:52:46 +01:00
Fufu Fang 20577e516c updated README.me, suppress "-Wunused-function" in crypto lock function in network.c 2019-08-24 18:13:47 +01:00
Fufu Fang 6aa180db5e updated some error message 2019-07-21 17:08:25 +01:00
Fufu Fang ed37aa5ca0 removed CURL_LOCK_DATA_CONNECT to solve #36 without disabling HTTP2 2019-07-21 08:41:02 +01:00
Fufu Fang 4491377f64 forces HTTP1.1 to fix issue #36 2019-07-20 19:25:25 +01:00
Fufu Fang 283520136c Closing issue #33, now set a default cache directory 2019-04-30 08:06:09 +01:00
Fufu Fang f1c7e6e97e setting CURLMOPT_MAX_HOST_CONNECTIONS just in case 2019-04-28 01:24:35 +01:00
Fufu Fang 4acf91a2b8 added --max-seg-count command line option 2019-04-27 04:52:39 +01:00
Fufu Fang ba8c7232e2 HTTP 429, LinkTable_print(), variable shadowing
changed the way HTTP 429 gets handled while querying for file stats
fixed LinkTable_print(), added variable shawdowing warning in Makefile
2019-04-27 02:42:29 +01:00
Fufu Fang 2a2ac2dce2 rewrote curl_multi_perform_once() 2019-04-27 01:53:09 +01:00