view src/protocols/zephyr/ZInit.c @ 2347:182a4f8b1333

[gaim-migrate @ 2360] Sorry rob. I just don't think that you should be committing what you know is half-complete code, and allow users to access it. We can't be recommending to people to be using CVS instead of releases and then add things that we know beforehand are buggy or incomplete. Also I don't think that you've implemented it properly: More than just Oscar have buddy icons (though Jabber is reworking their buddy icon stuff) and so it shouldn't be protocol-specific like this; also it should apply to the aim_user and not the gaim_connection, and you should be able to set it while you're not online, which means it should go in the Modify Account dialog and not the Protocol Actions dialog, with an OPT_PROTO_BUDDY_ICON flag so that the dialog knows whether or not the buddy icon can be set. Also, you broke -Wall. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 22 Sep 2001 10:08:19 +0000
parents 424a40f12a6c
children 7ba69b8e0de5
line wrap: on
line source

/* This file is part of the Project Athena Zephyr Notification System.
 * It contains source for the ZInitialize function.
 *
 *	Created by:	Robert French
 *
 *	$Source$
 *	$Author: warmenhoven $
 *
 *	Copyright (c) 1987, 1991 by the Massachusetts Institute of Technology.
 *	For copying and distribution information, see the file
 *	"mit-copyright.h". 
 */
/* $Header$ */

#ifndef lint
static char rcsid_ZInitialize_c[] =
    "$Zephyr: /afs/athena.mit.edu/astaff/project/zephyr/src/lib/RCS/ZInitialize.c,v 1.17 89/05/30 18:11:25 jtkohl Exp $";
#endif

#include <internal.h>

#include <sys/socket.h>
#ifdef ZEPHYR_USES_KERBEROS
#include <krb_err.h>
#endif

Code_t ZInitialize()
{
    struct servent *hmserv;
    char addr[4];
#ifdef ZEPHYR_USES_KERBEROS
    int krbval;

    initialize_krb_error_table();
#endif

    initialize_zeph_error_table();
    
    (void) memset((char *)&__HM_addr, 0, sizeof(__HM_addr));

    __HM_addr.sin_family = AF_INET;

    /* Set up local loopback address for HostManager */
    addr[0] = 127;
    addr[1] = 0;
    addr[2] = 0;
    addr[3] = 1;

    hmserv = (struct servent *)getservbyname(HM_SVCNAME, "udp");
    __HM_addr.sin_port = (hmserv) ? hmserv->s_port : HM_SVC_FALLBACK;

    (void) memcpy((char *)&__HM_addr.sin_addr, addr, 4);

    __HM_set = 0;

#ifdef ZEPHYR_USES_KERBEROS
    if ((krbval = krb_get_lrealm(__Zephyr_realm, 1)) != KSUCCESS)
	return (krbval);
#endif

    /* Get the sender so we can cache it */
    (void) ZGetSender();

    /* Initialize the input queue */
    __Q_Tail = NULL;
    __Q_Head = NULL;
    
    return (ZERR_NONE);
}