aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-08 16:34:49 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-08 16:34:49 +0100
commit2528cdad90271f80d2ffe0e679ff8258f3e94e4c (patch)
tree9557a527a0aca1cae02806e7aff1d9df8e3e25a9 /lib/misc.c
parentb8906261293b34d8c792bd1f48df10144a8a8f10 (diff)
parentee6cc946dc4ee82cb641df94a6ba101e99253af2 (diff)
Merging msn-offline branch. A tiny bit of MSNP13, and it works for the first
minute of the session (after that the MSN server finds out the rest of BitlBee still speaks MSNP8).
Diffstat (limited to 'lib/misc.c')
-rw-r--r--lib/misc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/misc.c b/lib/misc.c
index fda19c19..22832221 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -297,11 +297,10 @@ void http_decode( char *s )
/* This fuction is safe, but make sure you call it safely as well! */
void http_encode( char *s )
{
- char *t;
+ char t[strlen(s)+1];
int i, j;
- t = g_strdup( s );
-
+ strcpy( t, s );
for( i = j = 0; t[i]; i ++, j ++ )
{
/* Warning: isalnum() is locale-aware, so don't use it here! */
@@ -319,8 +318,6 @@ void http_encode( char *s )
}
}
s[j] = 0;
-
- g_free( t );
}
/* Strip newlines from a string. Modifies the string passed to it. */