Mercurial > pidgin.yaz
comparison src/protocols/zephyr/ZSubs.c @ 3277:ec20536eaeb0
[gaim-migrate @ 3295]
Arun says to do this.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 28 May 2002 08:40:48 +0000 |
parents | 7ba69b8e0de5 |
children | 43d6c08d7e96 |
comparison
equal
deleted
inserted
replaced
3276:a334dada69c3 | 3277:ec20536eaeb0 |
---|---|
3 * ZCancelSubscriptions functions. | 3 * ZCancelSubscriptions functions. |
4 * | 4 * |
5 * Created by: Robert French | 5 * Created by: Robert French |
6 * | 6 * |
7 * $Source$ | 7 * $Source$ |
8 * $Author: warmenhoven $ | 8 * $Author: seanegan $ |
9 * | 9 * |
10 * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. | 10 * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. |
11 * For copying and distribution information, see the file | 11 * For copying and distribution information, see the file |
12 * "mit-copyright.h". | 12 * "mit-copyright.h". |
13 */ | 13 */ |
14 /* $Header$ */ | 14 /* $Header$ */ |
15 | 15 |
16 #include <internal.h> | 16 #include <internal.h> |
17 | 17 |
18 #ifndef lint | 18 #ifndef lint |
19 static const char rcsid_ZSubscriptions_c[] = "$Id: ZSubs.c 2432 2001-10-03 19:38:28Z warmenhoven $"; | 19 static const char rcsid_ZSubscriptions_c[] = "$Id: ZSubs.c 3295 2002-05-28 08:40:48Z seanegan $"; |
20 #endif | 20 #endif |
21 | 21 |
22 static Code_t Z_Subscriptions __P((register ZSubscription_t *sublist, | 22 static Code_t Z_Subscriptions __P((register ZSubscription_t *sublist, |
23 int nitems, unsigned int port, | 23 int nitems, unsigned int port, |
24 char *opcode, int authit)); | 24 char *opcode, int authit)); |
74 register int i, j; | 74 register int i, j; |
75 int retval; | 75 int retval; |
76 ZNotice_t notice; | 76 ZNotice_t notice; |
77 char header[Z_MAXHEADERLEN]; | 77 char header[Z_MAXHEADERLEN]; |
78 char **list; | 78 char **list; |
79 char *recip; | |
79 int hdrlen; | 80 int hdrlen; |
80 int size_avail = Z_MAXPKTLEN-Z_FRAGFUDGE; /* space avail for data, | 81 int size_avail = Z_MAXPKTLEN-Z_FRAGFUDGE; /* space avail for data, |
81 adjusted below */ | 82 adjusted below */ |
82 int size, start, numok; | 83 int size, start, numok; |
83 | 84 |
115 | 116 |
116 /* assemble subs into an array of pointers */ | 117 /* assemble subs into an array of pointers */ |
117 for (i=0;i<nitems;i++) { | 118 for (i=0;i<nitems;i++) { |
118 list[i*3] = sublist[i].zsub_class; | 119 list[i*3] = sublist[i].zsub_class; |
119 list[i*3+1] = sublist[i].zsub_classinst; | 120 list[i*3+1] = sublist[i].zsub_classinst; |
120 if (sublist[i].zsub_recipient && *sublist[i].zsub_recipient && | 121 recip = sublist[i].zsub_recipient; |
121 *sublist[i].zsub_recipient != '*') | 122 if (recip && *recip == '*') |
122 list[i*3+2] = ZGetSender(); | 123 recip++; |
123 else | 124 if (!recip || (*recip != 0 && *recip != '@')) |
124 list[i*3+2] = ""; | 125 recip = ZGetSender(); |
126 list[i*3+2] = recip; | |
125 } | 127 } |
126 | 128 |
127 start = -1; | 129 start = -1; |
128 i = 0; | 130 i = 0; |
129 numok = 0; | 131 numok = 0; |