1
0
mirror of https://github.com/moparisthebest/socat synced 2024-12-21 22:48:48 -05:00

corrected alphabetical order of options (proxy-auth); bad conditional with token

This commit is contained in:
Gerhard Rieger 2008-07-24 07:32:56 +02:00
parent 780b4028fe
commit 5251c21479
4 changed files with 10 additions and 10 deletions

View File

@ -16,6 +16,10 @@ corrections:
additional empty arguments (thanks to Olivier Hervieu for reporting
this bug)
corrected alphabetical order of options (proxy-auth)
some minor corrections
improved test.sh script
####################### V 1.6.0.1:

View File

@ -1 +1 @@
"1.6.0.1+ip4bind+recvfromfork+x64+execstderr+execspaces"
"1.6.0.1+ip4bind+recvfromfork+x64+execstderr+execspaces+cosmetics"

View File

@ -20,7 +20,7 @@ int procan_cdefs(FILE *outfile) {
fprintf(outfile, "#define FD_SETSIZE %u\n", FD_SETSIZE);
#endif
#ifdef NFDBITS
fprintf(outfile, "#define NFDBITS %u\n", (unsigned int)NFDBITS);
fprintf(outfile, "#define NFDBITS "F_Zu"\n", NFDBITS);
#endif
#ifdef O_RDONLY
fprintf(outfile, "#define O_RDONLY %u\n", O_RDONLY);

View File

@ -1046,8 +1046,8 @@ const struct optname optionnames[] = {
#ifdef SO_PROTOTYPE
IF_SOCKET ("prototype", &opt_so_prototype)
#endif
IF_PROXY ("proxy-authorization", &opt_proxy_authorization)
IF_PROXY ("proxy-auth", &opt_proxy_authorization)
IF_PROXY ("proxy-authorization", &opt_proxy_authorization)
IF_PROXY ("proxy-resolve", &opt_proxy_resolve)
IF_PROXY ("proxyauth", &opt_proxy_authorization)
IF_PROXY ("proxyport", &opt_proxyport)
@ -1304,7 +1304,7 @@ const struct optname optionnames[] = {
#ifdef SO_USELOOPBACK /* AIX433, Solaris */
IF_SOCKET ("so-useloopback", &opt_so_useloopback)
#endif /* SO_USELOOPBACK */
IF_SOCKS4 ("socksport", &opt_socksport)
IF_SOCKS4 ("socksport", &opt_socksport)
IF_SOCKS4 ("socksuser", &opt_socksuser)
IF_IPAPP ("sourceport", &opt_sourceport)
IF_IPAPP ("sp", &opt_sourceport)
@ -1714,12 +1714,8 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
case TYPE_BYTE:
{
unsigned long ul;
if (token) {
char *rest;
ul = strtoul(token, &rest/*!*/, 0);
} else {
ul = 1;
}
char *rest;
ul = strtoul(token, &rest/*!*/, 0);
if (ul > UCHAR_MAX) {
Error3("parseopts(%s): byte value exceeds limit (%lu vs. %u), using max",
a0, ul, UCHAR_MAX);