Tue, 31 Jan 2006 21:35:43 +0000
[gaim-migrate @ 15447]
correctly parse NTLM realm
| src/protocols/simple/simple.c | file | annotate | diff | comparison | revisions |
--- a/src/protocols/simple/simple.c Tue Jan 31 21:02:52 2006 +0000 +++ b/src/protocols/simple/simple.c Tue Jan 31 21:35:43 2006 +0000 @@ -45,7 +45,6 @@ #include "ntlm.h" static char *gentag() { -// return g_strdup("0e3f151"); return g_strdup_printf("%04d%04d", rand() & 0xFFFF, rand() & 0xFFFF); } @@ -313,6 +312,8 @@ tmp2 = g_strstr_len(tmp, strlen(tmp), "\""); if(tmp2) retval = g_strndup(tmp, tmp2 - tmp); + else + retval = g_strdup(tmp); } return retval; @@ -338,9 +339,8 @@ auth->type = 2; if(!strstr(hdr, "gssapi-data")) { gaim_debug_info("simple","here"); - parts = g_strsplit(hdr, " ", 0); + parts = g_strsplit(hdr+5, "\", ", 0); i = 0; - auth->realm = "SIP Communications Service"; while(parts[i]) { gaim_debug_info("simple","parts[i] %s\n",parts[i]); if((tmp = parse_attribute("targetname=\"",