Added initial console commands for plugins

fixed crash in plugin destructor
fixed compilation not being freed causing a crash
fixed small issues in plugin system
fixed plugin iterator not being reseted when freed and not being initialized it's current pointer.
fixed a bug where insertion of a prefixed string would not check whether a value could be set.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40221
This commit is contained in:
Borja Ferrer
2006-12-16 02:16:21 +00:00
parent e0bd4f9782
commit c9002c2011
6 changed files with 219 additions and 12 deletions
+6
View File
@@ -603,6 +603,12 @@ bool sm_trie_insert(Trie *trie, const char *key, void *value)
/* Do an initial browsing to make sure they're not the same string */
if (strcmp(keyptr, term) == 0)
{
if (!node->valset)
{
node->valset = true;
node->value = value;
return true;
}
/* Same string. We can't insert. */
return false;
}