changeset 13085:3382d7aa9ca3

[gaim-migrate @ 15447] correctly parse NTLM realm committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Tue, 31 Jan 2006 21:35:43 +0000
parents 31a3a9af1494
children 6c772241a6f8
files src/protocols/simple/simple.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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=\"",