Mercurial > pidgin
changeset 13088:a91a8a28f61f
[gaim-migrate @ 15450]
Compile warning fixes
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 01 Feb 2006 06:04:22 +0000 |
parents | a62e694b35e4 |
children | b553326bc468 |
files | src/ntlm.c src/ntlm.h src/protocols/simple/simple.c |
diffstat | 3 files changed, 17 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ntlm.c Tue Jan 31 22:00:34 2006 +0000 +++ b/src/ntlm.c Wed Feb 01 06:04:22 2006 +0000 @@ -204,7 +204,9 @@ } } -gchar *gaim_ntlm_gen_type3(gchar *username, gchar *passw, gchar *hostname, gchar *domain, gchar *nonce, guint32 *flags) { +gchar * +gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, gchar *nonce, guint32 *flags) +{ char lm_pw[14]; unsigned char lm_hpw[21]; char sesskey[16]; @@ -225,7 +227,7 @@ char *tmp = 0; int idx = 0; - /* type3 message initialization */ + /* type3 message initialization */ tmsg->protocol[0] = 'N'; tmsg->protocol[1] = 'T'; tmsg->protocol[2] = 'L'; @@ -262,7 +264,7 @@ tmp += strlen(username); strcpy(tmp, hostname); tmp += strlen(hostname); - + /* LM */ if (len > 14) len = 14; @@ -313,7 +315,7 @@ /*tmsg->flags2 = 0x0a280105; tmsg->flags3 = 0x0f000000;*/ - + tmp = gaim_base64_encode((guchar*) tmsg, msglen); g_free(tmsg); return tmp;
--- a/src/ntlm.h Tue Jan 31 22:00:34 2006 +0000 +++ b/src/ntlm.h Wed Feb 01 06:04:22 2006 +0000 @@ -54,6 +54,6 @@ * @param flags Pointer to the flags returned by gaim_ntlm_parse_type2 * @return A base64 encoded type3 message */ -gchar *gaim_ntlm_gen_type3(gchar *username, gchar *passw, gchar *hostname, gchar *domain, gchar *nonce, guint32 *flags); +gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, gchar *nonce, guint32 *flags); #endif /* _GAIM_NTLM_H */
--- a/src/protocols/simple/simple.c Tue Jan 31 22:00:34 2006 +0000 +++ b/src/protocols/simple/simple.c Wed Feb 01 06:04:22 2006 +0000 @@ -265,8 +265,12 @@ gchar *response; gchar *ret; gchar *tmp; - char *authdomain = gaim_account_get_string(sip->account, "authdomain", ""); - char *authuser = gaim_account_get_string(sip->account, "authuser", sip->username); + const char *authdomain; + const char *authuser; + + authdomain = gaim_account_get_string(sip->account, "authdomain", ""); + authuser = gaim_account_get_string(sip->account, "authuser", sip->username); + if(!authuser || strlen(authuser)<1) { authuser = sip->username; } @@ -321,14 +325,16 @@ static void fill_auth(struct simple_account_data *sip, gchar *hdr, struct sip_auth *auth) { int i=0; - char *authuser = gaim_account_get_string(sip->account, "authuser", sip->username); + const char *authuser; char *tmp; gchar **parts; + authuser = gaim_account_get_string(sip->account, "authuser", sip->username); + if(!authuser || strlen(authuser)<1) { authuser = sip->username; } - + if(!hdr) { gaim_debug_error("simple", "fill_auth: hdr==NULL\n"); return;