changeset 11483:0d18fa6c3b41

[gaim-migrate @ 13725] missing ==NULL check removed a NTLM debug message missing g_strdup committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Fri, 09 Sep 2005 19:46:13 +0000
parents 3ced52f7ace2
children 4539174a88bd
files src/protocols/simple/simple.c src/protocols/simple/sipmsg.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/simple/simple.c	Fri Sep 09 19:36:31 2005 +0000
+++ b/src/protocols/simple/simple.c	Fri Sep 09 19:46:13 2005 +0000
@@ -280,8 +280,7 @@
 			return tmp;
 		}
 		ret = gaim_ntlm_gen_type1("gaim", sip->servername);
-/*		tmp = g_strdup_printf("NTLM qop=\"auth\" realm=\"%s\" targetname=\"%s\" response=\"%s\"\r\n", auth->realm, auth->target, ret); */
-		tmp = g_strdup_printf("NTLM qop=\"auth\" realm=\"%s\" targetname=\"%s\" response=\"010000003134303017f6dcfb4531f92f\"\r\n", auth->realm, auth->target);
+		tmp = g_strdup_printf("NTLM qop=\"auth\" realm=\"%s\" targetname=\"%s\" response=\"%s\"\r\n", auth->realm, auth->target, ret);
 		g_free(ret);
 		return tmp;
 	}
@@ -601,6 +600,8 @@
 		tmp = strchr(from, ';');
 		if(tmp) {
 			from = g_strndup(from,tmp-from);
+		} else {
+			from = g_strdup(from);
 		}
 	}
 	gaim_debug_info("simple", "got %s\n",from);
--- a/src/protocols/simple/sipmsg.c	Fri Sep 09 19:36:31 2005 +0000
+++ b/src/protocols/simple/sipmsg.c	Fri Sep 09 19:46:13 2005 +0000
@@ -54,6 +54,7 @@
 	gchar *dummy2;
 	gchar *tmp;
 	int i=1;
+	if(!lines[0]) return NULL;
 	parts = g_strsplit(lines[0], " ", 3);
 	if(!parts[0] || !parts[1] || !parts[2]) {
 		g_strfreev(parts);
@@ -128,7 +129,7 @@
 	gchar *old;
 	GSList *cur;
 	struct siphdrelement *elem;
-	if(msg->response) out = g_strdup_printf("SIP/2.0 %d AAA\r\n", msg->response);
+	if(msg->response) out = g_strdup_printf("SIP/2.0 %d Unknown\r\n", msg->response);
 	else out = g_strdup_printf("%s %s SIP/2.0\r\n",msg->method, msg->target);
 	cur = msg->headers;
 	while(cur) {