Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=4187613
By: breathermachine

I'm making a text morphing plugin for gaim. Before it sends the message i typed,
it will modify it through a callback function responding to the "sending-im-msg"
signal.

void sending_im_msg(GaimAccount *account, const char *receiver,
                       char **message);

This is the callback prototype for that. The documentation at 
gaim.sourceforge.net
says that you should free *message before replacing it with a new string.

I tried this piece of code but it breaks my gaim.

        char *str;
        g_free(*message);
        str=g_malloc(13); //just enough for a 12-character, format-free text.
        strcpy(str,"Now more fun");
        message=str;

Somehow this doesn't work in my system.
Anyone help?
Thanks

Jay.

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=665

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Gaim-forums mailing list
Gaim-forums@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gaim-forums

Reply via email to