ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/yahoo2/libyahoo2 libyahoo2.c,1.14,1.1


From: Philip S Tellis <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/yahoo2/libyahoo2 libyahoo2.c,1.14,1.15 yahoo2_callbacks.h,1.2,1.3
Date: Thu, 20 Mar 2003 04:19:00 -0500

Update of /cvsroot/ayttm/ayttm/modules/yahoo2/libyahoo2
In directory subversions:/tmp/cvs-serv26068/modules/yahoo2/libyahoo2

Modified Files:
        libyahoo2.c yahoo2_callbacks.h 
Log Message:
fetch yab only after getting cookies

Index: libyahoo2.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/libyahoo2/libyahoo2.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- libyahoo2.c 16 Mar 2003 18:23:43 -0000      1.14
+++ libyahoo2.c 20 Mar 2003 09:18:58 -0000      1.15
@@ -974,7 +974,7 @@
                        }
                        YAHOO_CALLBACK(ext_yahoo_got_identities)(yd->client_id, 
yd->identities);
                        break;
-               case 59: /* cookies add C cookie */
+               case 59: /* cookies */
                        if(yd->ignorelist) {
                                yd->ignore = bud_str2list(yd->ignorelist);
                                FREE(yd->ignorelist);
@@ -1002,6 +1002,9 @@
                                yd->cookie_c = getcookie(pair->value);
                        } 
 
+                       if(yd->cookie_y && yd->cookie_t && yd->cookie_c)
+                               
YAHOO_CALLBACK(ext_yahoo_got_cookies)(yd->client_id);
+
                        break;
                case 3: /* my id */
                case 90: /* 1 */
@@ -1618,16 +1621,19 @@
        if(!yd)
                return NULL;
 
-       DEBUG_MSG(("rxlen is %d", yd->rxlen));
+       DEBUG_MSG(("rxlen is %d, rxqueue is %s", yd->rxlen, yd->rxqueue));
 
-       while(pos < yd->rxlen-1 && memcmp(yd->rxqueue + pos, "<r", 2))
+       /* start with <record */
+       while(pos < yd->rxlen-strlen("<record")+1 
+                       && memcmp(yd->rxqueue + pos, "<record", 
strlen("<record")))
                pos++;
 
        if(pos >= yd->rxlen-1)
                return NULL;
 
        end = pos+2;
-       while(end < yd->rxlen-1 && memcmp(yd->rxqueue + end, "/>", 2))
+       /* end with /> */
+       while(end < yd->rxlen-strlen("/>")+1 && memcmp(yd->rxqueue + end, "/>", 
strlen("/>")))
                end++;
 
        if(end >= yd->rxlen-1)

Index: yahoo2_callbacks.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/libyahoo2/yahoo2_callbacks.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- yahoo2_callbacks.h  15 Jan 2003 12:53:34 -0000      1.2
+++ yahoo2_callbacks.h  20 Mar 2003 09:18:58 -0000      1.3
@@ -122,6 +122,18 @@
 
 
 
+
+/*
+ * Name: ext_yahoo_got_cookies
+ *     Called when the cookie list is got from the server
+ * Params:
+ *     id   - the id that identifies the server connection
+ */
+void YAHOO_CALLBACK_TYPE(ext_yahoo_got_cookies)(int id);
+
+
+
+
 /*
  * Name: ext_yahoo_status_changed
  *     Called when remote user's status changes.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]