diff options
| author | Your Name <you@example.com> | 2026-05-21 13:19:51 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-21 13:19:51 +0530 |
| commit | 5592e194029aafe96d76a0948750b8b43ae74413 (patch) | |
| tree | 4d1ad0fc23cf98f591becd8b33658fe6efd55e5a /main/tollgate_api.c | |
| parent | 716daafce3eaa5ebfd246c1ef9915a2972b4c6fd (diff) | |
cleanup: remove debug code, align mint URL to testnut-nutshell
- Remove DNS resolve test and unused includes from debug endpoint
- Reduce mint_health probe logging to DEBUG level
- Update default mint URL from testnut.cashu.space to
testnut-nutshell.mints.orangesync.tech in config.c,
tollgate_platform.c, .env, AGENTS.md
Diffstat (limited to 'main/tollgate_api.c')
| -rw-r--r-- | main/tollgate_api.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/main/tollgate_api.c b/main/tollgate_api.c index 5ac0543..80fe6ed 100644 --- a/main/tollgate_api.c +++ b/main/tollgate_api.c | |||
| @@ -6,9 +6,6 @@ | |||
| 6 | #include "captive_portal.h" | 6 | #include "captive_portal.h" |
| 7 | #include "firewall.h" | 7 | #include "firewall.h" |
| 8 | #include "lwip/dns.h" | 8 | #include "lwip/dns.h" |
| 9 | #include "lwip/netdb.h" | ||
| 10 | #include "esp_http_client.h" | ||
| 11 | #include "esp_crt_bundle.h" | ||
| 12 | #include "esp_heap_caps.h" | 9 | #include "esp_heap_caps.h" |
| 13 | #include "nucula_wallet.h" | 10 | #include "nucula_wallet.h" |
| 14 | #include "mint_health.h" | 11 | #include "mint_health.h" |
| @@ -734,19 +731,6 @@ static esp_err_t api_get_debug(httpd_req_t *req) | |||
| 734 | cJSON_AddStringToObject(root, "sta_ip", sta_ip_str); | 731 | cJSON_AddStringToObject(root, "sta_ip", sta_ip_str); |
| 735 | cJSON_AddStringToObject(root, "sta_gw", sta_gw_str); | 732 | cJSON_AddStringToObject(root, "sta_gw", sta_gw_str); |
| 736 | 733 | ||
| 737 | struct addrinfo hints = {0}, *res = NULL; | ||
| 738 | hints.ai_family = AF_INET; | ||
| 739 | int dns_rc = getaddrinfo("testnut-compat.mints.orangesync.tech", NULL, &hints, &res); | ||
| 740 | if (dns_rc == 0 && res) { | ||
| 741 | struct sockaddr_in *addr = (struct sockaddr_in *)res->ai_addr; | ||
| 742 | char resolved[16]; | ||
| 743 | snprintf(resolved, sizeof(resolved), IPSTR, IP2STR(&(esp_ip4_addr_t){.addr=addr->sin_addr.s_addr})); | ||
| 744 | cJSON_AddStringToObject(root, "dns_resolve", resolved); | ||
| 745 | } else { | ||
| 746 | cJSON_AddStringToObject(root, "dns_resolve", dns_rc == 0 ? "no-addr" : "FAIL"); | ||
| 747 | } | ||
| 748 | if (res) freeaddrinfo(res); | ||
| 749 | |||
| 750 | char *json = cJSON_PrintUnformatted(root); | 734 | char *json = cJSON_PrintUnformatted(root); |
| 751 | httpd_resp_set_type(req, "application/json"); | 735 | httpd_resp_set_type(req, "application/json"); |
| 752 | httpd_resp_sendstr(req, json); | 736 | httpd_resp_sendstr(req, json); |