mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-28 22:05:48 +08:00
proxy: no variable named small, a macro for char on Windows
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
rpcndr.h, which windows.h brings in, defines small as char, so the buffer the rest of a request is read into, unsigned char small[256], did not compile with MSVC. Renamed, and the splice heuristic's small in mainconf.c too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8cc7d255af
commit
8517a5675b
@ -484,12 +484,12 @@ static int srvprepare(struct srvstart *s, int argc, char **argv){
|
|||||||
SPLICE_DOWNLOAD|SPLICE_UPLOAD|SPLICE_AUTO) &
|
SPLICE_DOWNLOAD|SPLICE_UPLOAD|SPLICE_AUTO) &
|
||||||
(SPLICE_DOWNLOAD|SPLICE_UPLOAD|SPLICE_AUTO);
|
(SPLICE_DOWNLOAD|SPLICE_UPLOAD|SPLICE_AUTO);
|
||||||
if(heur){
|
if(heur){
|
||||||
int min = 0, streak = 0, small = 0;
|
int min = 0, streak = 0, smallsz = 0;
|
||||||
|
|
||||||
sscanf(heur+1, "%d,%d,%d", &min, &streak, &small);
|
sscanf(heur+1, "%d,%d,%d", &min, &streak, &smallsz);
|
||||||
if(min > 0) srv->splicemin = min;
|
if(min > 0) srv->splicemin = min;
|
||||||
if(streak > 0) srv->splicestreak = streak;
|
if(streak > 0) srv->splicestreak = streak;
|
||||||
if(small > 0) srv->splicesmall = small;
|
if(smallsz > 0) srv->splicesmall = smallsz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1623,12 +1623,12 @@ CLEANRET:
|
|||||||
|
|
||||||
/* the rest of a request whose headers were not all read */
|
/* the rest of a request whose headers were not all read */
|
||||||
if(!hdrsdone && ((r >= 509 && r < 517) || r > 900)) {
|
if(!hdrsdone && ((r >= 509 && r < 517) || r > 900)) {
|
||||||
unsigned char small[256];
|
unsigned char rest[256];
|
||||||
int atstart = 1;
|
int atstart = 1;
|
||||||
|
|
||||||
while((i = sockgetlinebuf(param, CLIENT, small, sizeof(small) - 1, '\n', param->srv->timeouts[STRING_S])) > 0){
|
while((i = sockgetlinebuf(param, CLIENT, rest, sizeof(rest) - 1, '\n', param->srv->timeouts[STRING_S])) > 0){
|
||||||
if(atstart && i <= 2 && small[i-1] == '\n') break;
|
if(atstart && i <= 2 && rest[i-1] == '\n') break;
|
||||||
atstart = (small[i-1] == '\n');
|
atstart = (rest[i-1] == '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(r == 10) stidx = 2;
|
if(r == 10) stidx = 2;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user