changeset 13678:299536c4caf1

[gaim-migrate @ 16080] Set the SIP/SIMPLE user-agent string to something more that I think makes more sense, and set wants_to_die in two places when disconnecting. This causes the account to be disable until the user re-enables it. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 22 Apr 2006 15:13:51 +0000
parents 7f5b3313dd07
children 873845ed5b32
files src/protocols/simple/simple.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/simple/simple.c	Sat Apr 22 15:11:07 2006 +0000
+++ b/src/protocols/simple/simple.c	Sat Apr 22 15:13:51 2006 +0000
@@ -624,7 +624,7 @@
 			"To: <%s>%s%s\r\n"
 			"Max-Forwards: 10\r\n"
 			"CSeq: %d %s\r\n"
-			"User-Agent: Gaim SIP/SIMPLE Plugin\r\n"
+			"User-Agent: Gaim/" VERSION "\r\n"
 			"Call-ID: %s\r\n"
 			"%s%s"
 			"Content-Length: %" G_GSIZE_FORMAT "\r\n\r\n%s",
@@ -992,6 +992,7 @@
 			if(sip->registerstatus != 2) {
 				gaim_debug_info("simple", "REGISTER retries %d\n", sip->registrar.retries);
 				if(sip->registrar.retries > 3) {
+					sip->gc->wants_to_die = TRUE;
 					gaim_connection_error(sip->gc, _("Wrong Password"));
 					return TRUE;
 				}
@@ -1581,6 +1582,7 @@
 	gc = gaim_account_get_connection(account);
 
 	if (strpbrk(username, " \t\v\r\n") != NULL) {
+		gc->wants_to_die = TRUE;
 		gaim_connection_error(gc, _("SIP usernames may not contain whitespaces or @ symbols"));
 		return;
 	}