changeset 1935:22a3b4b52971

[gaim-migrate @ 1945] Hooray. :-) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 01 Jun 2001 18:31:30 +0000
parents e875b1cb2470
children f0b54f592486
files ChangeLog plugins/napster.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 01 18:21:54 2001 +0000
+++ b/ChangeLog	Fri Jun 01 18:31:30 2001 +0000
@@ -2,6 +2,8 @@
 
 version 0.11.0-pre13:
 	* Can view/set chat topic in Jabber (thanks faceprint)
+	* The napster plugin no longer segfaults on invalid names
+	  and/or passwords.
 
 version 0.11.0-pre12 (05/29/2001):
 	* Fixed a funny bug with auto responses when queued messages
--- a/plugins/napster.c	Fri Jun 01 18:21:54 2001 +0000
+++ b/plugins/napster.c	Fri Jun 01 18:31:30 2001 +0000
@@ -857,10 +857,21 @@
 	read(source, header, 4);
 	len = header[0];
 	command = header[1];	
-	
+
 	read(source, buf, len);
 	buf[len] = 0;
 
+	/* If we have some kind of error, get outta here */
+	if (command == 0x00)
+	{
+		do_error_dialog(buf, "Gaim: Napster Error");
+		gdk_input_remove(ndata->inpa);
+		ndata->inpa = 0;
+		close(source);
+		signoff(gc);
+		return;
+	}
+
 	if (command == 0x03) {
 		printf("Registered with E-Mail address of: %s\n", buf);
 		ndata->email = g_strdup(buf);