summaryrefslogtreecommitdiff
path: root/net/ayttm/files/patch-modules::yahoo2::libyahoo2::libyahoo2.c
blob: a54e41ee0c470de717ce39bddb572d74b820fac8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- modules/yahoo2/libyahoo2/libyahoo2.c.orig	Fri Jan 16 14:39:19 2004
+++ modules/yahoo2/libyahoo2/libyahoo2.c	Sun Feb  8 00:33:04 2004
@@ -813,9 +813,9 @@
 	inputs = y_list_remove(inputs, yid);
 
 	LOG(("yahoo_input_close(read)")); 
-	YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->read_tag);
+	YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->yd->client_id, yid->read_tag);
 	LOG(("yahoo_input_close(write)")); 
-	YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->write_tag);
+	YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->yd->client_id, yid->write_tag);
 	yid->read_tag = yid->write_tag = 0;
 	if(yid->fd)
 		close(yid->fd);
@@ -1768,9 +1768,10 @@
 
 		/* Bad.  Abort.
 		 */
-		if ((magic_cnt + 1 > magic_len) || 
-				(magic_cnt > magic_len))
+		if (magic_cnt >= magic_len) {
+			WARNING(("magic_cnt(%d)  magic_len(%d)", magic_cnt, magic_len))
 			break;
+		}
 
 		byte1 = magic[magic_cnt];
 		byte2 = magic[magic_cnt+1];
@@ -2972,7 +2973,7 @@
 			y_list_free_1(l);
 		}
 		LOG(("yahoo_write_ready(%d, %d) len < 0", id, fd));
-		YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->write_tag);
+		YAHOO_CALLBACK(ext_yahoo_remove_handler)(id, yid->write_tag);
 		yid->write_tag = 0;
 		errno=e;
 		return 0;
@@ -2996,7 +2997,7 @@
 		*/
 		if(!yid->txqueues) {
 			LOG(("yahoo_write_ready(%d, %d) !yxqueues", id, fd));
-			YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->write_tag);
+			YAHOO_CALLBACK(ext_yahoo_remove_handler)(id, yid->write_tag);
 			yid->write_tag = 0;
 		}
 	}