freehoo-devel
[Top][All Lists]
Advanced

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

[Freehoo-devel] [PATCH: freehoo] ex_get_buddy_list bug


From: Anand Avati
Subject: [Freehoo-devel] [PATCH: freehoo] ex_get_buddy_list bug
Date: Mon, 31 Jan 2005 02:10:43 -0600 (CST)
User-agent: SquirrelMail/1.4.3a

hi group,
   an attempt to broadcast a 'good morning' (before sleeping :D) and a
segfault... some debugging.. here's patch..
   get_nth_buddy(i) get's the ->data of 'buddies' global Ylist. the ->data is
actully a yahoo_account, so.. get_nth_buddy(i) gives the i'th yahoo_account,
but the code was treating it as 'struct yahoo_buddy' ..
   so after the patch i again broad cast a 'good morning' and i get back
replies telling 'good afternoon' :))
   please review and also maybe same patch needs to be applied in other
places..

regards,
avati

PS: patch is on 3.1.1 and not the latest cvs version

--snip--
diff -pruN freehoo-3.1.1/src/scm-procedures.c
freehoo-3.1.1-patch/src/scm-procedures.c
--- freehoo-3.1.1/src/scm-procedures.c  2005-01-11 09:59:04.000000000 +0530
+++ freehoo-3.1.1-patch/src/scm-procedures.c    2005-01-30
13:13:41.000000000 +0530
@@ -252,11 +252,11 @@ ex_get_buddy_list ()
 {
   int i = 0;
   SCM scm_buddy_list;
-  struct yahoo_buddy *temp_buddy;
+  yahoo_account *temp_buddy;

   scm_buddy_list = SCM_UNSPECIFIED;

-  while ((temp_buddy = (struct yahoo_buddy *) get_nth_buddy(i)))
+  while ((temp_buddy = (yahoo_account *) get_nth_buddy(i)))
     {
       if (!temp_buddy)
        break;
@@ -264,7 +264,7 @@ ex_get_buddy_list ()
       if (gh_list_p (scm_buddy_list) != 1)
        {
          scm_buddy_list =
-           gh_list (gh_str02scm (temp_buddy->id),
+           gh_list (gh_str02scm (temp_buddy->yahoo_id),
                     SCM_UNDEFINED);
        }
       else
@@ -272,7 +272,7 @@ ex_get_buddy_list ()
          scm_buddy_list =
            gh_append2 (scm_buddy_list,
                        gh_list (gh_str02scm
-                                (temp_buddy->id),
+                                (temp_buddy->yahoo_id),
                                 SCM_UNDEFINED));
        }
       i++;
--snip--

-- 
Anand V. Avati,
Quipus.org

Attachment: patch-freehoo-getbuddylist.diff
Description: Text document


reply via email to

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