# HG changeset patch # User Mark Doliner # Date 1138773862 0 # Node ID a91a8a28f61f11c7c9844376954d7d7d5e50b7f3 # Parent a62e694b35e4d4efc487fae275c71e6e9b2449c9 [gaim-migrate @ 15450] Compile warning fixes committer: Tailor Script diff -r a62e694b35e4 -r a91a8a28f61f src/ntlm.c --- 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; diff -r a62e694b35e4 -r a91a8a28f61f src/ntlm.h --- 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 */ diff -r a62e694b35e4 -r a91a8a28f61f src/protocols/simple/simple.c --- 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;