updates.
[silc.git] / apps / silcd / idlist.c
index c1354143fb3c67c69a20c7ec7525fc711b7cce84..1d6b9540a320563df5f4162e84703773618df480 100644 (file)
@@ -504,15 +504,16 @@ silc_idlist_add_channel(SilcIDList id_list, char *channel_name, int mode,
 
 /* Free channel entry.  This free's everything. */
 
-void silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry)
+int silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry)
 {
   if (entry) {
     SilcChannelClientEntry chl;
 
     /* Remove from cache */
     if (entry->id)
-      silc_idcache_del_by_id(id_list->channels, SILC_ID_CHANNEL, 
-                            (void *)entry->id);
+      if (!silc_idcache_del_by_id(id_list->channels, SILC_ID_CHANNEL, 
+                                 (void *)entry->id))
+       return FALSE;
 
     /* Free data */
     if (entry->channel_name)
@@ -535,6 +536,8 @@ void silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry)
       silc_free(chl);
     }
   }
+
+  return TRUE;
 }
 
 /* Finds channel by channel name. Channel names are unique and they