mirror of
https://repo.or.cz/socat.git
synced 2025-05-23 21:22:42 +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
|
||||
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:
|
||||
POSIXMQ-RECV now takes option o-nonblock; this, in combination with -T,
|
||||
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;
|
||||
occurred = false;
|
||||
chars = 7;
|
||||
if (groups == 0)
|
||||
fputs("(all)", of);
|
||||
for (j = 0; j < 8*sizeof(groups_t); ++j) {
|
||||
if (groups & 1) {
|
||||
if (occurred) {
|
||||
|
@ -150,8 +152,9 @@ int xioopenhelp(FILE *of,
|
|||
i = (40 - chars + 7) / 8;
|
||||
for (; i > 0; --i) { fputc('\t', of); }
|
||||
fputs("\tgroups=", of);
|
||||
groups = an->desc->groups; occurred = false;
|
||||
for (j = 0; j < 32; ++j) {
|
||||
groups = an->desc->groups;
|
||||
occurred = false;
|
||||
for (j = 0; j < sizeof(groups_t)*8; ++j) {
|
||||
if (groups & 1) {
|
||||
if (occurred) { fputc(',', of); }
|
||||
fprintf(of, "%s", addressgroupnames[j]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue