Commit Graph
26 Commits
Author SHA1 Message Date
Dave Walker (Daviey) 8d3957c04b Fix segfault in HTTP API rebind
Previously with HTTP API enabled on brenchmarking run, it is possible
to cause a segfault due to an issue handling the m_httpd pointer and
rebinding.

  - Initialize m_httpd to nullptr to indicate when it's not in use.
  - Safely delete m_httpd in Api's destructor to prevent use-after-free
    issues.
  - Add checks to ensure m_httpd is not nullptr before usage in start,
    stop, and tick methods.
  - Log errors for HTTP server start failures to aid in debugging.

Fixes MoneroOcean/xmrig#120

Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2024-02-11 17:52:36 +00:00
XMRig e89d253e02 Code cleanup. 2023-06-07 20:48:56 +07:00
Tony Butler b0fd994f84 Add API rebind polling 2023-05-23 16:49:43 -06:00
XMRig 22f68bda8d Code cleanup based on Clang-Tidy. 2021-08-25 18:45:15 +07:00
XMRig 4d9a8773de http-parser replaced to llhttp. 2021-03-06 01:46:49 +07:00
XMRig dadf4290dd Added "GET /2/dmi" API endpoint. 2021-01-20 22:54:02 +07:00
XMRig b814c1c12f Removed libcpuid support. 2020-12-06 21:51:24 +07:00
XMRig c8ebffd012 Added Cvt class. 2020-12-02 16:31:45 +07:00
XMRig 2771cf3582 Add 3rdparty prefix to all rapidjson includes. 2020-04-29 14:55:04 +07:00
XMRig a1bd9ccd93 Update base. 2020-04-29 14:17:33 +07:00
XMRig e1160b6db2 Added TLS support for API and many other TLS related changes. 2020-03-18 20:09:11 +07:00
XMRig ed44b0c009 Move files. 2020-03-09 01:22:34 +07:00
XMRig f016668fc2 HTTP subsystem refactoring. 2020-03-06 12:38:09 +07:00
XMRig 1ed7695d0a HTTP subsystem refactoring, fixed possible crashes shortly after destroying daemon or self-select client. 2020-02-23 01:40:19 +07:00
XMRig 4f4d08f518 Code cleanup. 2020-01-07 10:13:01 +07:00
XMRig f0b441040a Added ENV support for "user", "pass" and "rig-id" fields. 2019-12-22 19:09:30 +07:00
XMRig 976778c12c Added Env class. 2019-12-22 18:09:26 +07:00
XMRig 9200b3f7e3 Use normalize for load average values. 2019-12-04 10:25:26 +07:00
XMRig 39462aeec7 Use uv_get_free_memory. 2019-11-29 13:12:36 +07:00
XMRig 38d591c24f Added "resources" field to API. 2019-11-29 10:50:30 +07:00
XMRig 61cc3f6fc6 Code cleanup. 2019-11-29 10:17:05 +07:00
XMRig b2fd91a435 Minor changes, based on https://github.com/xmrig/xmrig-nvidia/pull/305 2019-11-28 05:14:17 +07:00
XMRig c4130e1eb5 Added "restricted" field to "GET /1/summary" request. 2019-09-26 17:29:24 +07:00
XMRig 79315bad8a Added initial OpenCL stub. 2019-08-13 01:44:52 +07:00
XMRig c40c6b3e77 Added pause and resume methods via JSON RPC 2.0 API. 2019-08-12 21:13:38 +07:00
XMRig 8ffd4017ac Common API code moved to base/api. 2019-08-12 16:52:16 +07:00