view libfaim/aim_search.c @ 1476:721cd9b73704

[gaim-migrate @ 1486] fix solaris stupidity (on my part). thanks tKirin committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 07 Feb 2001 20:06:29 +0000
parents 920c86b753d7
children
line wrap: on
line source


/*
 * aim_search.c
 *
 * TODO: Add aim_usersearch_name()
 *
 */

#include <faim/aim.h>

faim_export unsigned long aim_usersearch_address(struct aim_session_t *sess,
						 struct aim_conn_t *conn, 
						 char *address)
{
  struct command_tx_struct *newpacket;
  
  if (!address)
    return -1;

  if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+strlen(address))))
    return -1;

  newpacket->lock = 1;

  aim_putsnac(newpacket->data, 0x000a, 0x0002, 0x0000, sess->snac_nextid);

  aimutil_putstr(newpacket->data+10, address, strlen(address));

  aim_tx_enqueue(sess, newpacket);

  aim_cachesnac(sess, 0x000a, 0x0002, 0x0000, address, strlen(address)+1);

  return sess->snac_nextid;
}