summaryrefslogtreecommitdiff
path: root/lib/ZFmtAuth.c
diff options
context:
space:
mode:
authorGravatar Robert S. French <rfrench@mit.edu>1988-05-17 17:21:01 +0000
committerGravatar Robert S. French <rfrench@mit.edu>1988-05-17 17:21:01 +0000
commit031ec0f258f152c1e20905b381aa7f5974db1f3d (patch)
tree1c15619ec8a5192e2d5095c6efde5e9a47ddc7ce /lib/ZFmtAuth.c
parent4d21b4b5da809cdf4499190a1e27bff679a90422 (diff)
All sorts of changes for ver 0.2
Diffstat (limited to 'lib/ZFmtAuth.c')
-rw-r--r--lib/ZFmtAuth.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/lib/ZFmtAuth.c b/lib/ZFmtAuth.c
index 16ab432..5d7f91c 100644
--- a/lib/ZFmtAuth.c
+++ b/lib/ZFmtAuth.c
@@ -20,47 +20,47 @@ static char rcsid_ZFormatAuthenticNotice_c[] = "$Header$";
#include <zephyr/zephyr_internal.h>
-Code_t ZFormatAuthenticNotice(notice,buffer,buffer_len,len,session)
- ZNotice_t *notice;
- ZPacket_t buffer;
- int buffer_len;
- int *len;
- C_Block session;
+Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session)
+ ZNotice_t *notice;
+ char *buffer;
+ int buffer_len;
+ int *len;
+ C_Block session;
{
- ZNotice_t newnotice;
- char *ptr;
- int retval,hdrlen;
+ ZNotice_t newnotice;
+ char *ptr;
+ int retval, hdrlen;
- newnotice = *notice;
- newnotice.z_auth = 1;
- newnotice.z_authent_len = 0;
- newnotice.z_ascii_authent = (char *)"";
+ newnotice = *notice;
+ newnotice.z_auth = 1;
+ newnotice.z_authent_len = 0;
+ newnotice.z_ascii_authent = (char *)"";
- if ((retval = Z_FormatRawHeader(&newnotice,buffer,buffer_len,&hdrlen))
- != ZERR_NONE)
- return (retval);
+ if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, &hdrlen))
+ != ZERR_NONE)
+ return (retval);
- for (hdrlen--;buffer[hdrlen-1];hdrlen--)
- ;
+ for (hdrlen--;buffer[hdrlen-1];hdrlen--)
+ ;
- newnotice.z_checksum = (ZChecksum_t)quad_cksum(buffer,NULL,hdrlen,0,
- session);
+ newnotice.z_checksum = (ZChecksum_t)quad_cksum(buffer, NULL, hdrlen, 0,
+ session);
- if ((retval = Z_FormatRawHeader(&newnotice,buffer,buffer_len,&hdrlen))
- != ZERR_NONE)
- return (retval);
+ if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, &hdrlen))
+ != ZERR_NONE)
+ return (retval);
- ptr = buffer+hdrlen;
+ ptr = buffer+hdrlen;
- if (newnotice.z_message_len+hdrlen > buffer_len)
- return (ZERR_PKTLEN);
+ if (newnotice.z_message_len+hdrlen > buffer_len)
+ return (ZERR_PKTLEN);
- bcopy(newnotice.z_message,ptr,newnotice.z_message_len);
+ bcopy(newnotice.z_message, ptr, newnotice.z_message_len);
- *len = hdrlen+newnotice.z_message_len;
+ *len = hdrlen+newnotice.z_message_len;
- if (*len > Z_MAXPKTLEN)
- return (ZERR_PKTLEN);
+ if (*len > Z_MAXPKTLEN)
+ return (ZERR_PKTLEN);
- return (ZERR_NONE);
+ return (ZERR_NONE);
}