srt optimization code for query poller (#3334)

- add querySrtTransport, improve code.
- update SrtTransportManager key
- fix some warning
This commit is contained in:
johzzy
2024-03-02 06:25:32 -04:00
committed by GitHub
parent 1b709f665a
commit f49aed7a32
5 changed files with 61 additions and 101 deletions

View File

@@ -79,7 +79,7 @@ string strCoding::UrlEncodePath(const string &str) {
out.push_back(ch);
} else {
char buf[4];
sprintf(buf, "%%%X%X", (uint8_t) ch >> 4, (uint8_t) ch & 0x0F);
snprintf(buf, 4, "%%%X%X", (uint8_t) ch >> 4, (uint8_t) ch & 0x0F);
out.append(buf);
}
}
@@ -96,7 +96,7 @@ string strCoding::UrlEncodeComponent(const string &str) {
out.push_back(ch);
} else {
char buf[4];
sprintf(buf, "%%%X%X", (uint8_t) ch >> 4, (uint8_t) ch & 0x0F);
snprintf(buf, 4, "%%%X%X", (uint8_t) ch >> 4, (uint8_t) ch & 0x0F);
out.append(buf);
}
}