}
void *StorageGetById(const Storage *storage, const StorageEnum type, const int id) {
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
SCLogDebug("storage %p id %d", storage, id);
if (storage == NULL)
return NULL;
}
int StorageSetById(Storage *storage, const StorageEnum type, const int id, void *ptr) {
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
SCLogDebug("storage %p id %d", storage, id);
if (storage == NULL)
return -1;
}
void *StorageAllocByIdPrealloc(Storage *storage, StorageEnum type, int id) {
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
SCLogDebug("storage %p id %d", storage, id);
StorageMapping *map = &storage_map[type][id];
}
void *StorageAllocById(Storage **storage, StorageEnum type, int id) {
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
SCLogDebug("storage %p id %d", storage, id);
StorageMapping *map = &storage_map[type][id];
}
void StorageFreeById(Storage *storage, StorageEnum type, int id) {
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
SCLogDebug("storage %p id %d", storage, id);
StorageMapping *map = &storage_map[type][id];
if (*storage == NULL)
return;
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
+
Storage *store = storage;
int i;
for (i = 0; i < storage_max_id[type]; i++) {
if (*storage == NULL)
return;
+#ifdef DEBUG
+ BUG_ON(!storage_registraton_closed);
+#endif
+
Storage *store = *storage;
int i;
for (i = 0; i < storage_max_id[type]; i++) {