util.c


Log

Author Commit Date CI Message
kanoi 6d495b0c 2014-07-08T19:22:15 mutex lock getaddrinfo
Con Kolivas 533ab490 2014-06-21T10:45:21 Clean up pool failure and failover code for stratum
Con Kolivas 0f5f29d1 2014-06-12T12:41:51 Allow zero length strings to be passed to valid_hex
Con Kolivas 453eaed4 2014-06-10T12:19:14 Use valid_ascii testing for job_id since it need not be hex only
Con Kolivas e1c50507 2014-06-10T11:36:22 Do some random sanity checking for stratum message parsing
Con Kolivas f6e53fb1 2014-05-31T12:38:54 Add a sanity checking memcpy function which checks for overflows
Con Kolivas 5a1f63ea 2014-05-19T13:41:15 Merge pull request #595 from Elbandi/idlebugfix Mark pool as idle if stratum restart is failed
Andras Elso 9aef36ad 2014-05-19T00:50:19 Mark pool as idle if stratum restart is failed
Con Kolivas 6469d3b6 2014-05-02T15:02:13 Make reconnection messages more explanatory
Kano 040b42c5 2014-05-02T14:15:20 Startum client.reconnect require matching URL
Elso Andras acb15bfc 2014-04-25T22:21:44 Fix idle bug, when redirected client can't auth
Con Kolivas 55e0ebe3 2014-04-14T21:25:40 Shuffle windows headers included
Con Kolivas 89447943 2014-04-14T19:51:28 Recalloc correct pointer
Con Kolivas 8f4b6028 2014-04-05T10:01:26 Provide helper function for recallocing memory
Con Kolivas c481f2c9 2014-04-02T23:09:48 Compact gbt solo extra data and store the length, allowing it to be variable, leaving room for a signature
Con Kolivas 41b0c398 2014-03-29T12:00:36 Minor correctness fix for unnecessary free
Con Kolivas e0c66a02 2014-03-29T11:54:46 Clean up various curl build issues
Kano c7d68866 2014-03-29T10:13:17 allow url based config files
Con Kolivas bea3c9e3 2014-03-18T22:51:18 Fix missing htobe16 on windows and meaningless >u32 string warning.
Con Kolivas 680a4755 2014-03-18T19:17:57 Fix ser_number for no remaining val byte.
Con Kolivas d6a5fd76 2014-03-18T16:13:00 Fix transaction processing for gbt solo.
Con Kolivas 5cc83a30 2014-03-18T12:01:28 Encode height using integer varint format.
Con Kolivas ff82f319 2014-03-17T11:30:38 Update solo coinbase regularly and submit as gbt work
Con Kolivas 8d5d971b 2014-03-16T23:53:35 Generate gbt solo work emulating stratum work construction.
Con Kolivas 73932de0 2014-03-16T23:03:17 Move swork.diff out of the stratum work section to be shared as sdiff.
Con Kolivas 6826525b 2014-03-16T22:37:06 Avoid allocing and freeing stratum strings that should be fixed length.
Con Kolivas a95e9e57 2014-03-16T22:21:49 Remove unnecessary header length calculation for stratum header binary and only binary convert the correct length of the header.
Con Kolivas 159587ba 2014-03-16T22:11:33 Share more fields between stratum and gbt
Con Kolivas 8f5a81eb 2014-03-16T21:53:42 Share coinbase_len variable b/w stratum and gbt and setup more gbt solo parameters.
Con Kolivas d0c4650d 2014-03-16T21:46:07 Generate a valid coinbase and set nonce2offset for gbt solo
Con Kolivas 69d2ee81 2014-03-15T23:37:47 Add helper functions for creating script signature templates and beging building template.
Con Kolivas 98b4216c 2014-03-11T23:27:36 Implement efficient merkle tree base from solo GBT information.
Con Kolivas 2e5c69bf 2014-03-02T13:08:02 Clean up parse_method
Con Kolivas e9f10244 2014-03-02T08:50:20 More gracefully break out of parse_notify on a corrupted hex string error, checking the return value of all hex2bin conversions and being consistent with using stack memory. Fix an unlocking error in cases of failure.
Con Kolivas 4887025a 2014-02-07T08:33:00 Only show one decimal place if pool diff is not an integer.
Con Kolivas 3adb8279 2014-02-02T08:37:01 Check for more interrupted conditions in util.c and handle them gracefully.
Con Kolivas e799a53a 2014-02-01T23:01:38 Handle interruptions to various select calls in util.c
Con Kolivas 4b9d03b5 2014-01-23T22:03:39 Merge branch 'master' of github.com:ckolivas/cgminer
Con Kolivas 295c1c74 2014-01-23T22:02:58 Clear pool work on a stratum reconnect message.
Kano d9440866 2014-01-18T09:36:51 Modify thread naming to make them easier to identify
Con Kolivas 589eeda0 2014-01-11T09:32:16 Change stratum strings under stratum_lock in reconnect and free old strings.
Con Kolivas 03da645d 2013-12-09T23:11:47 Provide a helper function that can reset cgsems to zero.
Con Kolivas 4715ee84 2013-11-22T10:37:44 Drop json stratum auth failed message log level to verbose.
Maksym Borodin 8aea6859 2013-11-13T11:57:29 util.c: Decreasing reference count on allocated JSON obects to prevent memory leak
Maksym Borodin 27be1f7a 2013-11-13T11:57:29 util.c: Decreasing reference count on allocated JSON obects to prevent memory leak
Maksym Borodin bca51e7e 2013-11-13T11:57:29 util.c: Decreasing reference count on allocated JSON obects to prevent memory leak
Con Kolivas 5d7c99f3 2013-11-06T00:24:16 Revert "Return ETIMEDOUT regardless if we fail in cgsem_mswait since we may be waiting on it on shutdown and the return response is harmless." This reverts commit 3dcae53e38021a61c10de1414195926c339d1c89.
Con Kolivas 3dcae53e 2013-11-05T21:56:01 Return ETIMEDOUT regardless if we fail in cgsem_mswait since we may be waiting on it on shutdown and the return response is harmless.
Con Kolivas 759bd39f 2013-11-02T11:04:06 Avoid the extra generation of a byte flipped hash2 in struct work and directly use the LE work hash.
Con Kolivas eaaf34a1 2013-10-31T15:07:26 Use a non blocking connect with a 1 second select timeout when initiating stratum to allow us to iterate over all IPs returned by getaddrinfo in round robin DNS pools.
Vitalii Demianets f75fdbbb 2013-08-22T16:02:02 Improve performance of work generation by optimizing hex2bin and bin2hex sprintf is a very expensive function, do direct translation instead.
Con Kolivas 3b04a306 2013-10-28T11:37:13 Merge branch 'master' into kncminer
Con Kolivas b424612c 2013-10-27T13:35:47 Use a sanity check on timeout on windows.
Vitalii Demianets dee0192b 2013-08-22T16:02:02 Improve performance of work generation by optimizing hex2bin and bin2hex sprintf is a very expensive function, do direct translation instead.
Con Kolivas d342bcbe 2013-10-25T11:56:32 Provide a mechanism for informing drivers of updated work templates for stratum and gbt mining.
Con Kolivas 8dcbc86b 2013-10-23T09:55:10 Use windows' own higher resolution time and handlers allowing us to have higher precision absolute timeouts.
Con Kolivas 563cad18 2013-10-23T09:13:50 Fix lldiv error in windows cgminer_t calculation.
Con Kolivas 39563824 2013-10-18T22:04:21 Send pthread_cancel to failed completion_timeout that has timed out.
ckolivas 7838af1d 2013-10-18T10:51:44 Remove unused variables.
ckolivas 0430165f 2013-10-18T10:26:31 Fix cgcompletion return code and free on successful completion.
ckolivas f826e357 2013-10-18T10:14:51 Provide a cg_completion_timeout helper function for unreliable functions that takes arbitrary functions and parameters and reliably returns.
Con Kolivas c9c39ac1 2013-10-14T11:44:13 Give correct return code in cgsem_mswait
Con Kolivas 6e948d87 2013-10-14T11:34:08 Check for correct timeout error in cgsem_mswait
Con Kolivas c75ce853 2013-10-14T11:22:57 Implement a generic cgsem_mswait similar to sem_timedwait
Con Kolivas d3c215fd 2013-10-12T09:53:21 Provide a lower level __bin2hex function that does not allocate memory itself.
Con Kolivas 7fbe999f 2013-10-11T12:00:39 Drop logging level for failed to connect to stratum to verbose mode only since we hit it regularly.
Con Kolivas 936fca4d 2013-10-07T20:38:24 Limit ms_tdiff to 1 hour as a sanity check.
Con Kolivas 97b5dd08 2013-10-07T20:38:24 Limit ms_tdiff to 1 hour as a sanity check.
Con Kolivas d5e9e084 2013-10-07T15:37:34 Prevent overflows in us_tdiff and ms_tdiff.
Con Kolivas 5eb19341 2013-10-07T20:38:24 Limit ms_tdiff to 1 hour as a sanity check.
Con Kolivas 2d1ba75e 2013-10-07T15:37:34 Prevent overflows in us_tdiff and ms_tdiff.
Con Kolivas 44b9cf50 2013-09-26T12:11:25 Limit the duration we wait for reads in BF1 based on time already elapsed to account for other delays such as work restart messages or out of work.
Con Kolivas 466d3bec 2013-09-21T22:49:28 Provide a --disable-libcurl config option to build support for stratum mining only.
Con Kolivas 566a80f0 2013-09-14T10:13:06 Cast -1 to (char) to cope with different default char types on ARM.
Con Kolivas f319d3b9 2013-09-10T07:02:16 Use inet_addr instead of inet_network to fix windows build.
Con Kolivas 7570d885 2013-09-08T19:54:18 Remove unused pbase variable.
Con Kolivas 89c07fa5 2013-09-08T16:32:44 Add support for socks4/4a proxies with stratum, and drop back to socks4 support via the global --socks-proxy command to not break previous configurations.
Con Kolivas f652b1e2 2013-09-08T10:14:19 Fix warning on mingw build.
Con Kolivas e65df993 2013-09-08T10:14:19 Fix warning on mingw build.
Con Kolivas 770556cd 2013-09-07T09:39:03 Use the --socks-proxy option with stratum, changing it to defaulting to socks5 and give appropriate message should it fail to connect.
Con Kolivas ddbd3ab7 2013-09-07T09:14:12 Cope with trailing slashes in stratum urls.
ckolivas 55249db3 2013-09-06T13:41:40 Add more debugging messages when negotiating with proxies for stratum.
ckolivas a589de5a 2013-09-06T10:28:36 Test specifically for socks5h in socks support for stratum.
Con Kolivas d7003ecc 2013-09-06T09:21:46 Add support for socks5 proxy with stratum
Con Kolivas 17019804 2013-09-06T00:34:04 Provide support for negotiating a stratum connection via http proxies.
Con Kolivas 8fa01556 2013-09-05T23:21:42 Connect to the proxy URL and port if specified for stratum sockets instead of the pool directly.
Con Kolivas b783d94c 2013-09-05T23:14:53 Extract any proxy url and port to be used by sockaddr if possible using extract_sockaddr.
Con Kolivas 8ede407d 2013-09-05T23:10:19 Make extract_sockaddr set variables passed to it rather than pool struct members.
Con Kolivas 83b5f624 2013-08-31T22:24:38 Don't decref json values in stratum parsing due to memory corruption.
Con Kolivas bec40c5b 2013-08-31T13:32:40 Provide base structures for getaddrinfo.
Con Kolivas c9c61e72 2013-08-28T07:05:18 Fix win32 build.
Con Kolivas 036c7b73 2013-08-25T16:34:07 Fix OSX build.
Con Kolivas 79ca14f5 2013-08-25T15:17:34 Provide an osx fix for cgtimers and a fallback to timevals for all other platforms !linux !win32 !osx.
Con Kolivas f009347e 2013-08-25T15:02:01 Move two more timer functions out of define macros to enable them to be used by future osx code.
Con Kolivas ec881c41 2013-08-25T14:59:35 cgtimer_sub is now the same since cgtimer_t should be the same on all platforms.
Con Kolivas e1433f8e 2013-08-22T13:49:22 Use timespecs on windows as cgtimer_t to capitalise on the higher resolution clock changes.
Con Kolivas d8e2a437 2013-08-22T12:55:09 Abstract out the conversion of system time to an lldiv_t in decimicroseconds.
Con Kolivas acc1b7df 2013-08-22T12:24:39 Use our own gettimeofday implementation on windows for it to be consistent across ming builds and higher resolution.
Con Kolivas 903d007c 2013-08-20T22:47:13 Provide cgtimer_sub helper functions.
Con Kolivas 9dc63cee 2013-08-20T22:35:38 Provide cgtimer_to_ms helper functions.