From 691216a298bff79faac4ac49b4a17adf65758100 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Mon, 22 Jan 2024 17:31:09 +0100 Subject: [PATCH] fix incorrect formatting #1288 this time in the right branch... --- .../spectran_http_source/src/spectran_http_client.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source_modules/spectran_http_source/src/spectran_http_client.cpp b/source_modules/spectran_http_source/src/spectran_http_client.cpp index 77a19328..5b6fe142 100644 --- a/source_modules/spectran_http_source/src/spectran_http_client.cpp +++ b/source_modules/spectran_http_source/src/spectran_http_client.cpp @@ -1,5 +1,6 @@ #include "spectran_http_client.h" #include +#include SpectranHTTPClient::SpectranHTTPClient(std::string host, int port, dsp::stream* stream) { this->stream = stream; @@ -50,10 +51,10 @@ void SpectranHTTPClient::setCenterFrequency(uint64_t freq) { // Make request net::http::RequestHeader rqhdr(net::http::METHOD_PUT, "/control", host); char buf[1024]; - sprintf(buf, "{\"frequencyCenter\":%d,\"frequencySpan\":%d,\"type\":\"capture\"}", freq, _samplerate); + sprintf(buf, "{\"frequencyCenter\":%" PRIu64 ",\"frequencySpan\":%" PRIu64 ",\"type\":\"capture\"}", freq, _samplerate); std::string data = buf; char lenBuf[16]; - sprintf(lenBuf, "%d", data.size()); + sprintf(lenBuf, "%" PRIu64, data.size()); rqhdr.setField("Content-Length", lenBuf); controlHttp.sendRequestHeader(rqhdr); controlSock->sendstr(data);