[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.95,1.96
From: |
Philip S Tellis <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.95,1.96 |
Date: |
Thu, 27 Mar 2003 07:57:11 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2
In directory subversions:/tmp/cvs-serv1541/modules/msn2
Modified Files:
msn.C
Log Message:
Fix memory leaks. Now if only I can do that for myself
Index: msn.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/msn.C,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- msn.C 26 Mar 2003 21:55:48 -0000 1.95
+++ msn.C 27 Mar 2003 12:57:08 -0000 1.96
@@ -731,7 +731,7 @@
msg->header = NULL;
msg->font = NULL;
msg->colour = NULL;
- msg->content = strdup("text/plain; charset=UTF-8");
+ msg->content = msn_permstring("text/plain; charset=UTF-8");
if(strlen(mess)>1100)
{
char buf[1024];
@@ -1219,7 +1219,7 @@
msg->body = g_strndup(tmp, 1098);
free(tmp);
msg->font=NULL;
- msg->content=strdup("text/plain; charset=UTF-8");
+ msg->content=msn_permstring("text/plain; charset=UTF-8");
/* I conform to this indentation scheme under protest :-) -Meredydd */
msnconn * conn=(msnconn *)room->protocol_local_chat_room_data;
@@ -1280,7 +1280,7 @@
snprintf(dialog_message, sizeof(dialog_message), _("The MSN user %s
(%s) would like to add you to their contact list.\n\nDo you want to allow them
to see when you are online?"),
tmp, username);
free(tmp);
- uname = strdup(username);
+ uname = msn_permstring(username);
msn_add_to_llist(waiting_auth_callbacks, (llist_data *)uname);
eb_do_dialog(dialog_message, _("Authorize MSN User"),
eb_msn_authorize_callback, (gpointer)uname );
return 1;
@@ -1328,6 +1328,7 @@
return; /* we already know him */
groupname[0]=0;
+ /* FIXME Memory leak here */
if(strstr(groups,","))
group = strdup(strstr(groups,",")+1);
else
@@ -2435,21 +2436,22 @@
if(msg->font==NULL) { return; }
- retval = g_strdup (msg->body);
if (msg->italic)
- retval = g_strdup_printf ("<i>%s</i>", retval);
+ retval = g_strdup_printf ("<i>%s</i>", msg->body);
if (msg->bold)
- retval = g_strdup_printf ("<b>%s</b>", retval);
+ retval = g_strdup_printf ("<b>%s</b>", msg->body);
if (msg->underline)
- retval = g_strdup_printf ("<u>%s</u>", retval);
+ retval = g_strdup_printf ("<u>%s</u>", msg->body);
/* todo: other formatting fields
* CO: color - color IS in HTML colour format (RGB hex)
* CS: ? (haven't the faintest - Meredydd)
* PF: ? (ditto)
*/
+ if (retval==NULL)
+ retval = g_strdup (msg->body);
g_free(msg->body);
- msg->body=strdup(retval);
+ msg->body=retval;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.95,1.96,
Philip S Tellis <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm/po fr.po,1.21,1.22
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.15,1.16 msn_core.C,1.50,1.51 msn_core.h,1.15,1.16
- Previous by thread:
[Ayttm-commits] CVS: ayttm/po fr.po,1.21,1.22
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.15,1.16 msn_core.C,1.50,1.51 msn_core.h,1.15,1.16
- Index(es):