diff --git a/lib/dbi/path.c b/lib/dbi/path.c index c15c0f0e7..3d223f44a 100644 --- a/lib/dbi/path.c +++ b/lib/dbi/path.c @@ -31,7 +31,7 @@ int ogs_dbi_process_change_stream(const bson_t *document) rv = ogs_queue_push(ogs_app()->queue, e); if (rv != OGS_OK) { ogs_error("ogs_queue_push() failed:%d", (int)rv); - bson_destroy((bson_t*)e->dbi.document); + bson_destroy(e->dbi.document); ogs_event_free(e); } else { ogs_pollset_notify(ogs_app()->pollset); diff --git a/lib/proto/event.h b/lib/proto/event.h index 89624a9ad..da92e0f57 100644 --- a/lib/proto/event.h +++ b/lib/proto/event.h @@ -50,8 +50,6 @@ typedef struct ogs_sbi_request_s ogs_sbi_request_t; typedef struct ogs_sbi_response_s ogs_sbi_response_t; typedef struct ogs_sbi_message_s ogs_sbi_message_t; -typedef struct _bson_t bson_t; - typedef struct ogs_event_s { int id; int timer_id; @@ -66,7 +64,7 @@ typedef struct ogs_event_s { } sbi; struct { - const bson_t *document; + void *document; } dbi; } ogs_event_t; diff --git a/src/hss/hss-sm.c b/src/hss/hss-sm.c index 60ce6d4ea..c7e26be5f 100644 --- a/src/hss/hss-sm.c +++ b/src/hss/hss-sm.c @@ -90,7 +90,7 @@ void hss_state_operational(ogs_fsm_t *s, ogs_event_t *e) ogs_assert(e->dbi.document); hss_handle_change_event(e->dbi.document); - bson_destroy((bson_t*)e->dbi.document); + bson_destroy(e->dbi.document); break; default: