Core bug, and ebnc bug when handling the core bug

"A. Craig West" <[email protected]> Sun, 21 Mar 2004 03:04:22 -0500 (EST)
Newsgroups gmane.network.everybuddy.devel
Message-ID <[email protected]>
I should have changed the subject of my last message, it had very little to do
with ebnc, sorry to all...

On the other hand, this one has a bit more to do with it. The file
ebncurses.cpp needs to have more error checking added, it tends to assume
that just because an account name appears in a command from the core, that
account must already exist, so there is no NULL checking for the various
find() methods while parsing. This came up while testing another problem
I have, where if we add a local account that USED to exist, the core
remembers the buddy accounts that were associated with it (which is largely
a good thing, although I wish it would stop whining about it at start-up)
and sends the add_account messages for them BEFORE it sends the
add_local_account message, causing ebnc to crash. I've got a really simple
patch for what I consider to be incorrect core behaviour, but it would be
a good thing if the core was not able to cause the GUI's to crash...

------------ Patch Begins ------------
Index: core/src/gui_comms.c
===================================================================
--- core/src/gui_comms.c	(revision 311)
+++ core/src/gui_comms.c	(working copy)
@@ -1685,10 +1685,10 @@
 
   local_accounts=e_list_append(local_accounts, acc);
 
+  eb_gui_broadcast(add_command, 3);
+
   map_orphaned_accounts();
   map_orphaned_buddies();
-
-  eb_gui_broadcast(add_command, 3);
 }
 
 void eb_gui_del_local_account(eb_gui * gui)
------------ Patch Ends ------------

-- 
Craig West         Ph: (416) 666-1645	|  It's not a bug,
[email protected]              	|  It's a feature...