src/protocols/zephyr/ZSendRaw.c

Tue, 26 Oct 2004 01:00:35 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Tue, 26 Oct 2004 01:00:35 +0000
changeset 10145
f1405f65ff41
parent 8792
b0645c9dc276
child 11105
842fa517e08c
permissions
-rw-r--r--

[gaim-migrate @ 11218]
This fixes the crash / hang / strangeness when dragging a buddy to a
conversation entry thing. Also fixes a minor memory leak with old plugins.

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

#ifndef lint
static char rcsid_ZSendRawNotice_c[] = "$Header$";
#endif

#include "internal.h"

Code_t ZSendRawNotice(notice)
    ZNotice_t *notice;
{
    Code_t retval;
    ZNotice_t newnotice;
    char *buffer;
    int len;

    if ((retval = ZFormatRawNotice(notice, &buffer, &len)) !=
	ZERR_NONE)
	return (retval);

    if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
	return (retval);
    
    retval = Z_SendFragmentedNotice(&newnotice, len, NULL, Z_XmitFragment);

    free(buffer);

    return (retval);
}

mercurial