mirror of
https://repo.or.cz/socat.git
synced 2025-06-18 14:56:51 +00:00
Help shows option groups beyond 32 bits
This commit is contained in:
parent
b57d8668ec
commit
6a53c955d3
2 changed files with 8 additions and 2 deletions
3
CHANGES
3
CHANGES
|
@ -90,6 +90,9 @@ Corrections:
|
||||||
CONNECT addresses could use a wrong IPPROTO when getaddrinfo() does not
|
CONNECT addresses could use a wrong IPPROTO when getaddrinfo() does not
|
||||||
support the selected one (at least on Debian-4 with SCTP).
|
support the selected one (at least on Debian-4 with SCTP).
|
||||||
|
|
||||||
|
socat -h (help) did not show option groups POSIXMQ, SCTP, DCCP, and
|
||||||
|
UDPLITE of addresses.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
POSIXMQ-RECV now takes option o-nonblock; this, in combination with -T,
|
POSIXMQ-RECV now takes option o-nonblock; this, in combination with -T,
|
||||||
makes it possible to terminate Socat in case the queue is empty.
|
makes it possible to terminate Socat in case the queue is empty.
|
||||||
|
|
|
@ -87,6 +87,8 @@ static int xiohelp_option(FILE *of, const struct optname *on, const char *name)
|
||||||
groups = on->desc->group;
|
groups = on->desc->group;
|
||||||
occurred = false;
|
occurred = false;
|
||||||
chars = 7;
|
chars = 7;
|
||||||
|
if (groups == 0)
|
||||||
|
fputs("(all)", of);
|
||||||
for (j = 0; j < 8*sizeof(groups_t); ++j) {
|
for (j = 0; j < 8*sizeof(groups_t); ++j) {
|
||||||
if (groups & 1) {
|
if (groups & 1) {
|
||||||
if (occurred) {
|
if (occurred) {
|
||||||
|
@ -150,8 +152,9 @@ int xioopenhelp(FILE *of,
|
||||||
i = (40 - chars + 7) / 8;
|
i = (40 - chars + 7) / 8;
|
||||||
for (; i > 0; --i) { fputc('\t', of); }
|
for (; i > 0; --i) { fputc('\t', of); }
|
||||||
fputs("\tgroups=", of);
|
fputs("\tgroups=", of);
|
||||||
groups = an->desc->groups; occurred = false;
|
groups = an->desc->groups;
|
||||||
for (j = 0; j < 32; ++j) {
|
occurred = false;
|
||||||
|
for (j = 0; j < sizeof(groups_t)*8; ++j) {
|
||||||
if (groups & 1) {
|
if (groups & 1) {
|
||||||
if (occurred) { fputc(',', of); }
|
if (occurred) { fputc(',', of); }
|
||||||
fprintf(of, "%s", addressgroupnames[j]);
|
fprintf(of, "%s", addressgroupnames[j]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue