v0.7.26 - Tidy up api
This commit is contained in:
18
src/main.c
18
src/main.c
@@ -149,6 +149,11 @@ int mark_event_as_deleted(const char* event_id, const char* deletion_event_id, c
|
||||
// Forward declaration for database functions
|
||||
int store_event(cJSON* event);
|
||||
|
||||
// Forward declarations for monitoring system
|
||||
void init_monitoring_system(void);
|
||||
void cleanup_monitoring_system(void);
|
||||
void monitoring_on_event_stored(void);
|
||||
|
||||
// Forward declarations for NIP-11 relay information handling
|
||||
void init_relay_info();
|
||||
void cleanup_relay_info();
|
||||
@@ -729,8 +734,12 @@ int store_event(cJSON* event) {
|
||||
free(tags_json);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
free(tags_json);
|
||||
|
||||
// Call monitoring hook after successful event storage
|
||||
monitoring_on_event_stored();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1979,6 +1988,10 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
// Initialize NIP-40 expiration configuration
|
||||
init_expiration_config();
|
||||
|
||||
// Initialize monitoring system
|
||||
init_monitoring_system();
|
||||
|
||||
// Update subscription manager configuration
|
||||
update_subscription_manager_config();
|
||||
|
||||
@@ -2010,6 +2023,9 @@ int main(int argc, char* argv[]) {
|
||||
ginxsom_request_validator_cleanup();
|
||||
cleanup_configuration_system();
|
||||
|
||||
// Cleanup monitoring system
|
||||
cleanup_monitoring_system();
|
||||
|
||||
// Cleanup subscription manager mutexes
|
||||
pthread_mutex_destroy(&g_subscription_manager.subscriptions_lock);
|
||||
pthread_mutex_destroy(&g_subscription_manager.ip_tracking_lock);
|
||||
|
||||
Reference in New Issue
Block a user