]> andersk Git - libfaim.git/blob - aim_misc.c
- Fri Sep 1 23:34:28 UTC 2000
[libfaim.git] / aim_misc.c
1
2 /*
3  * aim_misc.c
4  *
5  * TODO: Seperate a lot of this into an aim_bos.c.
6  *
7  * Other things...
8  *
9  *   - Idle setting 
10  * 
11  *
12  */
13
14 #include <faim/aim.h> 
15
16 /*
17  * aim_bos_setidle()
18  *
19  *  Should set your current idle time in seconds.  Idealy, OSCAR should
20  *  do this for us.  But, it doesn't.  The client must call this to set idle
21  *  time.  
22  *
23  */
24 u_long aim_bos_setidle(struct aim_session_t *sess,
25                        struct aim_conn_t *conn, 
26                        u_long idletime)
27 {
28   return aim_genericreq_l(sess, conn, 0x0001, 0x0011, &idletime);
29 }
30
31
32 /*
33  * aim_bos_changevisibility(conn, changtype, namelist)
34  *
35  * Changes your visibility depending on changetype:
36  *
37  *  AIM_VISIBILITYCHANGE_PERMITADD: Lets provided list of names see you
38  *  AIM_VISIBILITYCHANGE_PERMIDREMOVE: Removes listed names from permit list
39  *  AIM_VISIBILITYCHANGE_DENYADD: Hides you from provided list of names
40  *  AIM_VISIBILITYCHANGE_DENYREMOVE: Lets list see you again
41  *
42  * list should be a list of 
43  * screen names in the form "Screen Name One&ScreenNameTwo&" etc.
44  *
45  * Equivelents to options in WinAIM:
46  *   - Allow all users to contact me: Send an AIM_VISIBILITYCHANGE_DENYADD
47  *      with only your name on it.
48  *   - Allow only users on my Buddy List: Send an 
49  *      AIM_VISIBILITYCHANGE_PERMITADD with the list the same as your
50  *      buddy list
51  *   - Allow only the uesrs below: Send an AIM_VISIBILITYCHANGE_PERMITADD 
52  *      with everyone listed that you want to see you.
53  *   - Block all users: Send an AIM_VISIBILITYCHANGE_PERMITADD with only 
54  *      yourself in the list
55  *   - Block the users below: Send an AIM_VISIBILITYCHANGE_DENYADD with
56  *      the list of users to be blocked
57  *
58  *
59  */
60 u_long aim_bos_changevisibility(struct aim_session_t *sess,
61                                 struct aim_conn_t *conn, 
62                                 int changetype, char *denylist)
63 {
64   struct command_tx_struct *newpacket;
65   int packlen = 0;
66   u_short subtype;
67
68   char *localcpy = NULL;
69   char *tmpptr = NULL;
70   int i,j;
71   int listcount;
72
73   if (!denylist)
74     return 0;
75
76   localcpy = (char *) malloc(strlen(denylist)+1);
77   memcpy(localcpy, denylist, strlen(denylist)+1);
78   
79   listcount = aimutil_itemcnt(localcpy, '&');
80   packlen = aimutil_tokslen(localcpy, 99, '&') + listcount + 9;
81
82   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, packlen)))
83     return -1;
84
85   newpacket->lock = 1;
86
87   switch(changetype)
88     {
89     case AIM_VISIBILITYCHANGE_PERMITADD:    subtype = 0x05; break;
90     case AIM_VISIBILITYCHANGE_PERMITREMOVE: subtype = 0x06; break;
91     case AIM_VISIBILITYCHANGE_DENYADD:      subtype = 0x07; break;
92     case AIM_VISIBILITYCHANGE_DENYREMOVE:   subtype = 0x08; break;
93     default:
94       free(newpacket->data);
95       free(newpacket);
96       return 0;
97     }
98
99   /* We actually DO NOT send a SNAC ID with this one! */
100   aim_putsnac(newpacket->data, 0x0009, subtype, 0x00, 0);
101  
102   j = 10;  /* the next byte */
103   
104   for (i=0; (i < (listcount - 1)) && (i < 99); i++)
105     {
106       tmpptr = aimutil_itemidx(localcpy, i, '&');
107
108       newpacket->data[j] = strlen(tmpptr);
109       memcpy(&(newpacket->data[j+1]), tmpptr, strlen(tmpptr));
110       j += strlen(tmpptr)+1;
111       free(tmpptr);
112     }
113   free(localcpy);
114
115   newpacket->lock = 0;
116
117   aim_tx_enqueue(sess, newpacket);
118
119   return (sess->snac_nextid); /* dont increment */
120
121 }
122
123
124
125 /*
126  * aim_bos_setbuddylist(buddylist)
127  *
128  * This just builds the "set buddy list" command then queues it.
129  *
130  * buddy_list = "Screen Name One&ScreenNameTwo&";
131  *
132  * TODO: Clean this up.  
133  *
134  * XXX: I can't stress the TODO enough.
135  *
136  */
137 u_long aim_bos_setbuddylist(struct aim_session_t *sess,
138                             struct aim_conn_t *conn, 
139                             char *buddy_list)
140 {
141   int i, j;
142
143   struct command_tx_struct *newpacket;
144
145   int len = 0;
146
147   char *localcpy = NULL;
148   char *tmpptr = NULL;
149
150   len = 10; /* 10B SNAC headers */
151
152   if (!buddy_list || !(localcpy = (char *) malloc(strlen(buddy_list)+1))) 
153     return -1;
154   strncpy(localcpy, buddy_list, strlen(buddy_list)+1);
155
156   i = 0;
157   tmpptr = strtok(localcpy, "&");
158   while ((tmpptr != NULL) && (i < 150)) {
159 #if debug > 0
160     printf("---adding %d: %s (%d)\n", i, tmpptr, strlen(tmpptr));
161 #endif
162     len += 1+strlen(tmpptr);
163     i++;
164     tmpptr = strtok(NULL, "&");
165   }
166 #if debug > 0
167   printf("*** send buddy list len: %d (%x)\n", len, len);
168 #endif
169
170   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, len)))
171     return -1;
172
173   newpacket->lock = 1;
174   
175   aim_putsnac(newpacket->data, 0x0003, 0x0004, 0x0000, 0);
176
177   j = 10;  /* the next byte */
178
179   strncpy(localcpy, buddy_list, strlen(buddy_list)+1);
180   i = 0;
181   tmpptr = strtok(localcpy, "&");
182   while ((tmpptr != NULL) & (i < 150)) {
183 #if debug > 0
184     printf("---adding %d: %s (%d)\n", i, tmpptr, strlen(tmpptr));
185 #endif
186     newpacket->data[j] = strlen(tmpptr);
187     memcpy(&(newpacket->data[j+1]), tmpptr, strlen(tmpptr));
188     j += 1+strlen(tmpptr);
189     i++;
190     tmpptr = strtok(NULL, "&");
191   }
192
193   newpacket->lock = 0;
194
195   aim_tx_enqueue(sess, newpacket);
196
197   free(localcpy);
198
199   return (sess->snac_nextid);
200 }
201
202 /* 
203  * aim_bos_setprofile(profile)
204  *
205  * Gives BOS your profile.
206  *
207  * 
208  */
209 u_long aim_bos_setprofile(struct aim_session_t *sess,
210                           struct aim_conn_t *conn, 
211                           char *profile,
212                           char *awaymsg,
213                           unsigned int caps)
214 {
215   struct command_tx_struct *newpacket;
216   int i = 0, tmp, caplen;
217
218   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 1152+strlen(profile)+1+(awaymsg?strlen(awaymsg):0))))
219     return -1;
220
221   i += aim_putsnac(newpacket->data, 0x0002, 0x004, 0x0000, sess->snac_nextid);
222   i += aim_puttlv_str(newpacket->data+i, 0x0001, strlen("text/x-aolrtf; charset=\"us-ascii\""), "text/x-aolrtf; charset=\"us-ascii\"");
223   i += aim_puttlv_str(newpacket->data+i, 0x0002, strlen(profile), profile);
224   /* why do we send this twice?  */
225   i += aim_puttlv_str(newpacket->data+i, 0x0003, strlen("text/x-aolrtf; charset=\"us-ascii\""), "text/x-aolrtf; charset=\"us-ascii\"");
226   
227   /* Away message -- we send this no matter what, even if its blank */
228   if (awaymsg)
229     i += aim_puttlv_str(newpacket->data+i, 0x0004, strlen(awaymsg), awaymsg);
230   else
231     i += aim_puttlv_str(newpacket->data+i, 0x0004, 0x0000, NULL);
232
233   /* Capability information. */
234  
235   tmp = (i += aimutil_put16(newpacket->data+i, 0x0005));
236   i += aimutil_put16(newpacket->data+i, 0x0000); /* rewritten later */
237   i += (caplen = aim_putcap(newpacket->data+i, 512, caps));
238   aimutil_put16(newpacket->data+tmp, caplen); /* rewrite TLV size */
239
240   newpacket->commandlen = i;
241   aim_tx_enqueue(sess, newpacket);
242   
243   return (sess->snac_nextid++);
244 }
245
246 /* 
247  * aim_bos_setgroupperm(mask)
248  * 
249  * Set group permisson mask.  Normally 0x1f (all classes).
250  *
251  * The group permission mask allows you to keep users of a certain
252  * class or classes from talking to you.  The mask should be
253  * a bitwise OR of all the user classes you want to see you.
254  *
255  */
256 u_long aim_bos_setgroupperm(struct aim_session_t *sess,
257                             struct aim_conn_t *conn, 
258                             u_long mask)
259 {
260   return aim_genericreq_l(sess, conn, 0x0009, 0x0004, &mask);
261 }
262
263 /*
264  * aim_bos_clientready()
265  * 
266  * Send Client Ready.  
267  *
268  * TODO: Dynamisize.
269  *
270  */
271 u_long aim_bos_clientready(struct aim_session_t *sess,
272                            struct aim_conn_t *conn)
273 {
274   u_char command_2[] = {
275      /* placeholders for dynamic data */
276      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
277      0xff, 0xff, 
278      /* real data */
279      0x00, 0x01,   
280      0x00, 0x03, 
281      0x00, 0x04, 
282      0x07, 0xda,  
283
284      0x00, 0x02, 
285      0x00, 0x01,  
286      0x00, 0x04, 
287      0x00, 0x01, 
288  
289      0x00, 0x03, 
290      0x00, 0x01,  
291      0x00, 0x04, 
292      0x00, 0x01,
293  
294      0x00, 0x04, 
295      0x00, 0x01, 
296      0x00, 0x04,
297      0x00, 0x01,
298  
299      0x00, 0x06, 
300      0x00, 0x01, 
301      0x00, 0x04,  
302      0x00, 0x01, 
303      0x00, 0x08, 
304      0x00, 0x01, 
305      0x00, 0x04,
306      0x00, 0x01,
307  
308      0x00, 0x09, 
309      0x00, 0x01, 
310      0x00, 0x04,
311      0x00, 0x01, 
312      0x00, 0x0a, 
313      0x00, 0x01, 
314      0x00, 0x04,
315      0x00, 0x01,
316  
317      0x00, 0x0b,
318      0x00, 0x01, 
319      0x00, 0x04,
320      0x00, 0x01
321   };
322   int command_2_len = 0x52;
323   struct command_tx_struct *newpacket;
324   
325   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, command_2_len)))
326     return -1;
327
328   newpacket->lock = 1;
329
330   memcpy(newpacket->data, command_2, command_2_len);
331   
332   /* This write over the dynamic parts of the byte block */
333   aim_putsnac(newpacket->data, 0x0001, 0x0002, 0x0000, sess->snac_nextid);
334
335   aim_tx_enqueue(sess, newpacket);
336
337   return (sess->snac_nextid++);
338 }
339
340 /* 
341  *  Request Rate Information.
342  * 
343  */
344 u_long aim_bos_reqrate(struct aim_session_t *sess,
345                        struct aim_conn_t *conn)
346 {
347   return aim_genericreq_n(sess, conn, 0x0001, 0x0006);
348 }
349
350 /* 
351  *  Rate Information Response Acknowledge.
352  *
353  */
354 u_long aim_bos_ackrateresp(struct aim_session_t *sess,
355                            struct aim_conn_t *conn)
356 {
357   struct command_tx_struct *newpacket;
358   int packlen = 20, i=0;
359
360   if(!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, packlen)))
361     return (sess->snac_nextid);
362   
363   newpacket->lock = 1;
364
365   i = aim_putsnac(newpacket->data, 0x0001, 0x0008, 0x0000, 0);
366   i += aimutil_put16(newpacket->data+i, 0x0001); 
367   i += aimutil_put16(newpacket->data+i, 0x0002);
368   i += aimutil_put16(newpacket->data+i, 0x0003);
369   i += aimutil_put16(newpacket->data+i, 0x0004);
370   i += aimutil_put16(newpacket->data+i, 0x0005);
371   
372   aim_tx_enqueue(sess, newpacket);
373
374   return (sess->snac_nextid);
375 }
376
377 /* 
378  * aim_bos_setprivacyflags()
379  *
380  * Sets privacy flags. Normally 0x03.
381  *
382  *  Bit 1:  Allows other AIM users to see how long you've been idle.
383  *  Bit 2:  Allows other AIM users to see how long you've been a member.
384  *
385  */
386 u_long aim_bos_setprivacyflags(struct aim_session_t *sess,
387                                struct aim_conn_t *conn, 
388                                u_long flags)
389 {
390   return aim_genericreq_l(sess, conn, 0x0001, 0x0014, &flags);
391 }
392
393 /*
394  * aim_bos_reqpersonalinfo()
395  *
396  * Requests the current user's information. Can't go generic on this one
397  * because aparently it uses SNAC flags.
398  *
399  */
400 u_long aim_bos_reqpersonalinfo(struct aim_session_t *sess,
401                                struct aim_conn_t *conn)
402 {
403   return aim_genericreq_n(sess, conn, 0x0001, 0x000e);
404 }
405
406 u_long aim_setversions(struct aim_session_t *sess,
407                                struct aim_conn_t *conn)
408 {
409   struct command_tx_struct *newpacket;
410   int i;
411
412   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10 + (4*12))))
413     return -1;
414
415   newpacket->lock = 1;
416
417   i = aim_putsnac(newpacket->data, 0x0001, 0x0017, 0x0000, sess->snac_nextid);
418
419   i += aimutil_put16(newpacket->data+i, 0x0001);
420   i += aimutil_put16(newpacket->data+i, 0x0003);
421
422   i += aimutil_put16(newpacket->data+i, 0x0002);
423   i += aimutil_put16(newpacket->data+i, 0x0001);
424
425   i += aimutil_put16(newpacket->data+i, 0x0003);
426   i += aimutil_put16(newpacket->data+i, 0x0001);
427
428   i += aimutil_put16(newpacket->data+i, 0x0004);
429   i += aimutil_put16(newpacket->data+i, 0x0001);
430
431   i += aimutil_put16(newpacket->data+i, 0x0006);
432   i += aimutil_put16(newpacket->data+i, 0x0001);
433
434   i += aimutil_put16(newpacket->data+i, 0x0008);
435   i += aimutil_put16(newpacket->data+i, 0x0001);
436
437   i += aimutil_put16(newpacket->data+i, 0x0009);
438   i += aimutil_put16(newpacket->data+i, 0x0001);
439
440   i += aimutil_put16(newpacket->data+i, 0x000a);
441   i += aimutil_put16(newpacket->data+i, 0x0001);
442
443   i += aimutil_put16(newpacket->data+i, 0x000b);
444   i += aimutil_put16(newpacket->data+i, 0x0002);
445
446   i += aimutil_put16(newpacket->data+i, 0x000c);
447   i += aimutil_put16(newpacket->data+i, 0x0001);
448
449   i += aimutil_put16(newpacket->data+i, 0x0013);
450   i += aimutil_put16(newpacket->data+i, 0x0001);
451
452   i += aimutil_put16(newpacket->data+i, 0x0015);
453   i += aimutil_put16(newpacket->data+i, 0x0001);
454
455 #if 0
456   for (j = 0; j < 0x10; j++) {
457     i += aimutil_put16(newpacket->data+i, j); /* family */
458     i += aimutil_put16(newpacket->data+i, 0x0003); /* version */
459   }
460 #endif
461   newpacket->lock = 0;
462   aim_tx_enqueue(sess, newpacket);
463
464   return (sess->snac_nextid++);
465 }
466
467
468 /*
469  * aim_bos_reqservice(serviceid)
470  *
471  * Service request. 
472  *
473  */
474 u_long aim_bos_reqservice(struct aim_session_t *sess,
475                           struct aim_conn_t *conn, 
476                           u_short serviceid)
477 {
478   return aim_genericreq_s(sess, conn, 0x0001, 0x0004, &serviceid);
479 }
480
481 /*
482  * aim_bos_nop()
483  *
484  * No-op.  WinAIM sends these every 4min or so to keep
485  * the connection alive.  Its not real necessary.
486  *
487  */
488 u_long aim_bos_nop(struct aim_session_t *sess,
489                    struct aim_conn_t *conn)
490 {
491   return aim_genericreq_n(sess, conn, 0x0001, 0x0016);
492 }
493
494 /*
495  * aim_bos_reqrights()
496  *
497  * Request BOS rights.
498  *
499  */
500 u_long aim_bos_reqrights(struct aim_session_t *sess,
501                          struct aim_conn_t *conn)
502 {
503   return aim_genericreq_n(sess, conn, 0x0009, 0x0002);
504 }
505
506 /*
507  * aim_bos_reqbuddyrights()
508  *
509  * Request Buddy List rights.
510  *
511  */
512 u_long aim_bos_reqbuddyrights(struct aim_session_t *sess,
513                               struct aim_conn_t *conn)
514 {
515   return aim_genericreq_n(sess, conn, 0x0003, 0x0002);
516 }
517
518 /*
519  * aim_send_warning(struct aim_session_t *sess, 
520  *                  struct aim_conn_t *conn, char *destsn, int anon)
521  * send a warning to destsn.
522  * anon is anonymous or not;
523  *  AIM_WARN_ANON anonymous
524  *
525  * returns -1 on error (couldn't alloc packet), next snacid on success.
526  *
527  */
528 int aim_send_warning(struct aim_session_t *sess, struct aim_conn_t *conn, char *destsn, int anon)
529 {
530   struct command_tx_struct *newpacket;
531   int curbyte;
532
533   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, strlen(destsn)+13)))
534     return -1;
535
536   newpacket->lock = 1;
537
538   curbyte  = 0;
539   curbyte += aim_putsnac(newpacket->data+curbyte,
540                         0x0004, 0x0008, 0x0000, sess->snac_nextid);
541
542   curbyte += aimutil_put16(newpacket->data+curbyte, (anon & AIM_WARN_ANON)?1:0);
543
544   curbyte += aimutil_put8(newpacket->data+curbyte, strlen(destsn));
545
546   curbyte += aimutil_putstr(newpacket->data+curbyte, destsn, strlen(destsn));
547
548   newpacket->commandlen = curbyte;
549   newpacket->lock = 0;
550
551   aim_tx_enqueue(sess, newpacket);
552
553   return (sess->snac_nextid++);
554 }
555
556
557
558 /*
559  * aim_debugconn_sendconnect()
560  *
561  * For aimdebugd.  If you don't know what it is, you don't want to.
562  */
563 u_long aim_debugconn_sendconnect(struct aim_session_t *sess,
564                                  struct aim_conn_t *conn)
565 {
566   return aim_genericreq_n(sess, conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_DEBUGCONN_CONNECT);
567 }
568
569 /*
570  * Generic routine for sending commands.
571  *
572  *
573  * I know I can do this in a smarter way...but I'm not thinking straight
574  * right now...
575  *
576  * I had one big function that handled all three cases, but then it broke
577  * and I split it up into three.  But then I fixed it.  I just never went
578  * back to the single.  I don't see any advantage to doing it either way.
579  *
580  */
581 u_long aim_genericreq_n(struct aim_session_t *sess,
582                         struct aim_conn_t *conn, 
583                         u_short family, u_short subtype)
584 {
585   struct command_tx_struct *newpacket;
586
587   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10)))
588     return 0;
589
590   newpacket->lock = 1;
591
592   aim_putsnac(newpacket->data, family, subtype, 0x0000, sess->snac_nextid);
593  
594   aim_tx_enqueue(sess, newpacket);
595   return (sess->snac_nextid++);
596 }
597
598 /*
599  *
600  *
601  */
602 u_long aim_genericreq_l(struct aim_session_t *sess,
603                         struct aim_conn_t *conn, 
604                         u_short family, u_short subtype, u_long *longdata)
605 {
606   struct command_tx_struct *newpacket;
607   u_long newlong;
608
609   /* If we don't have data, there's no reason to use this function */
610   if (!longdata)
611     return aim_genericreq_n(sess, conn, family, subtype);
612
613   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+sizeof(u_long))))
614     return -1;
615
616   newpacket->lock = 1;
617
618   aim_putsnac(newpacket->data, family, subtype, 0x0000, sess->snac_nextid);
619
620   /* copy in data */
621   newlong = htonl(*longdata);
622   memcpy(&(newpacket->data[10]), &newlong, sizeof(u_long));
623
624   aim_tx_enqueue(sess, newpacket);
625   return (sess->snac_nextid++);
626 }
627
628 u_long aim_genericreq_s(struct aim_session_t *sess,
629                         struct aim_conn_t *conn, 
630                         u_short family, u_short subtype, u_short *shortdata)
631 {
632   struct command_tx_struct *newpacket;
633   u_short newshort;
634
635   /* If we don't have data, there's no reason to use this function */
636   if (!shortdata)
637     return aim_genericreq_n(sess, conn, family, subtype);
638
639   if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+sizeof(u_short))))
640     return -1;
641
642   newpacket->lock = 1;
643
644   aim_putsnac(newpacket->data, family, subtype, 0x0000, sess->snac_nextid);
645
646   /* copy in data */
647   newshort = htons(*shortdata);
648   memcpy(&(newpacket->data[10]), &newshort, sizeof(u_short));
649
650   aim_tx_enqueue(sess, newpacket);
651   return (sess->snac_nextid++);
652 }
653
654 /*
655  * aim_bos_reqlocaterights()
656  *
657  * Request Location services rights.
658  *
659  */
660 u_long aim_bos_reqlocaterights(struct aim_session_t *sess,
661                                struct aim_conn_t *conn)
662 {
663   return aim_genericreq_n(sess, conn, 0x0002, 0x0002);
664 }
665
666 /*
667 * aim_bos_reqicbmparaminfo()
668  *
669  * Request ICBM parameter information.
670  *
671  */
672 u_long aim_bos_reqicbmparaminfo(struct aim_session_t *sess,
673                                 struct aim_conn_t *conn)
674 {
675   return aim_genericreq_n(sess, conn, 0x0004, 0x0004);
676 }
677
678 /*
679  * Add ICBM parameter? Huh?
680  */
681 unsigned long aim_addicbmparam(struct aim_session_t *sess,
682                                struct aim_conn_t *conn)
683 {
684   struct command_tx_struct *newpacket;
685   int packlen = 10+16, i=0;
686
687   if(!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, packlen)))
688     return (sess->snac_nextid);
689   
690   newpacket->lock = 1;
691
692   i = aim_putsnac(newpacket->data, 0x0004, 0x0002, 0x0000, sess->snac_nextid);
693   i += aimutil_put16(newpacket->data+i, 0x0000); 
694   i += aimutil_put16(newpacket->data+i, 0x0000);
695   i += aimutil_put16(newpacket->data+i, 0x0003);
696   i += aimutil_put16(newpacket->data+i, 0x1f40);
697   i += aimutil_put16(newpacket->data+i, 0x03e7);
698   i += aimutil_put16(newpacket->data+i, 0x03e7);
699   i += aimutil_put16(newpacket->data+i, 0x0000); 
700   i += aimutil_put16(newpacket->data+i, 0x0000); 
701   
702   aim_tx_enqueue(sess, newpacket);
703
704   return (sess->snac_nextid);
705 }
This page took 0.090274 seconds and 5 git commands to generate.