From 76c445ebeef624936244e337a4b4607e85c3e9ad Mon Sep 17 00:00:00 2001 From: John Kohl Date: Wed, 15 Jun 1988 18:33:25 +0000 Subject: new style subscriptions --- lib/ZRetSubs.c | 70 ++++++++++++++++++---------------------------------------- 1 file changed, 21 insertions(+), 49 deletions(-) (limited to 'lib/ZRetSubs.c') diff --git a/lib/ZRetSubs.c b/lib/ZRetSubs.c index 7ef9a74..5ace3fc 100644 --- a/lib/ZRetSubs.c +++ b/lib/ZRetSubs.c @@ -20,17 +20,13 @@ static char rcsid_ZRetrieveSubscriptions_c[] = "$Header$"; #include -#define MAXSUBPACKETS 200 /* If a person has more than 1000 - * subscriptions, he loses! */ - -#ifdef notdef Code_t ZRetrieveSubscriptions(port,nsubs) u_short port; int *nsubs; { int subscription_pred(); - int i,retval,nrecv,totalrecv,npacket,thispacket,returncode,gimmeack; + int i,retval,nrecv,gimmeack; ZNotice_t notice,retnotice; ZPacket_t buffer; char *ptr,*end,*ptr2; @@ -59,70 +55,48 @@ Code_t ZRetrieveSubscriptions(port,nsubs) if ((retval = ZSendNotice(¬ice,ZAUTH)) != ZERR_NONE) return (retval); - for (i=0;i MAXSUBPACKETS) { - returncode = ZERR_TOOMANYSUBS; - totalrecv = MAXSUBPACKETS; - } - thispacket = atoi(retnotice.z_opcode); - if (thispacket > MAXSUBPACKETS) - continue; - - if (subs_recvd[thispacket] == 'y') - continue; - subs_recvd[thispacket] = 'y'; + nrecv++; end = retnotice.z_message+retnotice.z_message_len; - npacket = 0; + __subscriptions_num = 0; for (ptr=retnotice.z_message;ptr