summaryrefslogtreecommitdiff
path: root/zhm/zhm_client.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-06-17 12:50:29 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-06-17 12:50:29 +0000
commit1c8ea5dd5a0412d137295166623d01a718da2ab3 (patch)
treea55e062729578fc3f1f2a3480e61580c222b1559 /zhm/zhm_client.c
parent67fe835826b8555cdc140e95c305fb8db631f1f4 (diff)
make sure multinotice is nulled out
use send_outgoing instead of ZSendRawNotice--we need to preserve fragmentation information
Diffstat (limited to 'zhm/zhm_client.c')
-rw-r--r--zhm/zhm_client.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/zhm/zhm_client.c b/zhm/zhm_client.c
index 94ee63b..e4c14bf 100644
--- a/zhm/zhm_client.c
+++ b/zhm/zhm_client.c
@@ -48,6 +48,7 @@ transmission_tower(notice, packet, pak_len)
gack = *notice;
gack.z_kind = HMACK;
gack.z_message_len = 0;
+ gack.z_multinotice = "";
gsin = cli_sin;
gsin.sin_port = from.sin_port;
if (gack.z_port == 0)
@@ -59,7 +60,7 @@ transmission_tower(notice, packet, pak_len)
com_err("hm", ret, "setting destination");
}
/* Bounce ACK to library */
- if ((ret = ZSendRawNotice(&gack)) != ZERR_NONE) {
+ if ((ret = send_outgoing(&gack)) != ZERR_NONE) {
Zperr(ret);
com_err("hm", ret, "sending raw notice");
}
@@ -70,7 +71,7 @@ transmission_tower(notice, packet, pak_len)
Zperr(ret);
com_err("hm", ret, "setting destination");
}
- if ((ret = ZSendRawNotice(notice)) != ZERR_NONE) {
+ if ((ret = send_outgoing(notice)) != ZERR_NONE) {
Zperr(ret);
com_err("hm", ret, "while sending raw notice");
}
@@ -83,3 +84,24 @@ transmission_tower(notice, packet, pak_len)
}
(void)add_notice_to_queue(notice, packet, &gsin, pak_len);
}
+
+Code_t
+send_outgoing(notice)
+ZNotice_t *notice;
+{
+ Code_t retval;
+ char *packet;
+ int length;
+
+ if (!(packet = (char *) malloc((unsigned)sizeof(ZPacket_t))))
+ return(ENOMEM);
+
+ if ((retval = ZFormatSmallRawNotice(notice, packet, &length))
+ != ZERR_NONE) {
+ free(packet);
+ return(retval);
+ }
+ retval = ZSendPacket(packet, length, 0);
+ free(packet);
+ return(retval);
+}