changeset 11190:fde0f4c1348d

[gaim-migrate @ 13308] - UDP fix - 501 response on unknown requests committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Thu, 04 Aug 2005 09:19:57 +0000
parents 5f79dfde334c
children d4c34046f942
files src/protocols/simple/simple.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/simple/simple.c	Thu Aug 04 09:10:11 2005 +0000
+++ b/src/protocols/simple/simple.c	Thu Aug 04 09:19:57 2005 +0000
@@ -378,7 +378,7 @@
 
 	
 	buf = g_strdup_printf("%s %s SIP/2.0\r\n"
-			"Via: SIP/2.0/TCP %s:%d;branch=%s\r\n"
+			"Via: SIP/2.0/%s %s:%d;branch=%s\r\n"
 			"From: <sip:%s@%s>;tag=%s\r\n"
 			"To: <%s>%s%s\r\n"
 			"Max-Forwards: 10\r\n"
@@ -389,6 +389,7 @@
 			"Content-Length: %d\r\n\r\n%s",
 			method,
 			url,
+			sip->udp ? "UDP" : "TCP",
 			sip->ip,	
 			sip->listenport,
 			branch,
@@ -826,6 +827,9 @@
 			process_incoming_subscribe(sip, msg);
 			found = 1;
 		}
+		if(!found) {
+	                send_sip_response(sip->gc, msg, 501, "Not implemented", NULL);
+		}
 	} else { // response
 		struct transaction *trans = transactions_find(sip, msg);
 		if(trans) {