summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2013-04-07 13:56:03 -0400
committerGravatar Karl Ramm <kcr@1ts.org>2013-04-07 14:02:45 -0400
commitfd7b449fb3667261cfe664ea7b6c8d0586425c41 (patch)
tree19ec62aed28b6d23fa896c596ff602fbf2cd68ae /clients
parent49c66f1d9bde50d442bd65b30c927ebe6f420d29 (diff)
add -U to zwrite for UNACKED messages
Based on a patch by Ray Link <rlink+git@cs.cmu.edu>
Diffstat (limited to 'clients')
-rw-r--r--clients/zwrite/zwrite.18
-rw-r--r--clients/zwrite/zwrite.c9
2 files changed, 16 insertions, 1 deletions
diff --git a/clients/zwrite/zwrite.1 b/clients/zwrite/zwrite.1
index 825e3cb..86472fa 100644
--- a/clients/zwrite/zwrite.1
+++ b/clients/zwrite/zwrite.1
@@ -32,6 +32,8 @@ zwrite \- write to another user via Zephyr
] [
.BI \-C
] [
+.BI \-U
+] [
.BI \-O
opcode ] [
.BI \-s
@@ -140,6 +142,12 @@ necessarily indicate that this option was used, or that the message
really was sent to the listed users, and its lack doesn't indicate
that the message was not sent to multiple users.
.TP
+.B \-U
+Send an unacked message.
+.I zwrite
+will not wait for acknowledgement that the message was sent, nor will
+it issue a PING before sending.
+.TP
.B \-s \fIsignature\fR
sets the signature to be included in the message. This overrides both
the user's name (as found in the password file) and any
diff --git a/clients/zwrite/zwrite.c b/clients/zwrite/zwrite.c
index 0f1fcf9..aae3101 100644
--- a/clients/zwrite/zwrite.c
+++ b/clients/zwrite/zwrite.c
@@ -31,6 +31,7 @@ static const char rcsid_zwrite_c[] = "$Id$";
int nrecips, msgarg, verbose, quiet, nodot, cc;
char *whoami, *inst, *class, *opcode, *realm, *recips[MAXRECIPS], *sender = 0;
Z_AuthProc auth;
+ZNotice_Kind_t kind = ACKED;
void un_tabify(char **, int *);
char *fix_filsrv_inst(char *);
@@ -196,6 +197,10 @@ main(int argc, char *argv[])
sender = argv[arg];
auth = ZNOAUTH;
break;
+ case 'U':
+ kind = UNACKED;
+ nocheck = 1; /* implied -n (no ping) */
+ break;
default:
usage(whoami);
}
@@ -234,7 +239,7 @@ main(int argc, char *argv[])
}
memset(&notice, 0, sizeof(ZNotice_t));
- notice.z_kind = ACKED;
+ notice.z_kind = kind;
notice.z_port = 0;
notice.z_class = class;
notice.z_class_inst = inst;
@@ -381,6 +386,8 @@ send_off(ZNotice_t *notice, int real)
com_err(whoami, retval, "while sending notice to %s", dest);
break;
}
+ if (kind == UNACKED)
+ continue;
if (real && !quiet) {
if (verbose)
printf("Queued... ");