mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
mgw: Use tall_mgw_ctx to allocate struct mgcp_config
Change-Id: Ib51f1066bb73da4472bd8967cc1b1c44e964e9e5
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
|
||||
#include "mgcp_ratectr.h"
|
||||
|
||||
extern void *tall_mgw_ctx;
|
||||
|
||||
#define RTP_PORT_DEFAULT_RANGE_START 16002
|
||||
#define RTP_PORT_DEFAULT_RANGE_END RTP_PORT_DEFAULT_RANGE_START + 64
|
||||
|
||||
|
@@ -1505,7 +1505,7 @@ struct mgcp_config *mgcp_config_alloc(void)
|
||||
* appropiate place! */
|
||||
struct mgcp_config *cfg;
|
||||
|
||||
cfg = talloc_zero(NULL, struct mgcp_config);
|
||||
cfg = talloc_zero(tall_mgw_ctx, struct mgcp_config);
|
||||
if (!cfg) {
|
||||
LOGP(DLMGCP, LOGL_FATAL, "Failed to allocate config.\n");
|
||||
return NULL;
|
||||
|
@@ -43,6 +43,8 @@
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
|
||||
void *tall_mgw_ctx;
|
||||
|
||||
char *strline_r(char *str, char **saveptr);
|
||||
|
||||
const char *strline_test_data =
|
||||
@@ -2323,7 +2325,7 @@ void test_conn_id_matching(void)
|
||||
|
||||
INIT_LLIST_HEAD(&endp.conns);
|
||||
|
||||
conn = talloc_zero(NULL, struct mgcp_conn);
|
||||
conn = talloc_zero(tall_mgw_ctx, struct mgcp_conn);
|
||||
OSMO_ASSERT(conn);
|
||||
osmo_strlcpy(conn->id, conn_id_generated, sizeof(conn->id));
|
||||
llist_add(&conn->entry, &endp.conns);
|
||||
|
Reference in New Issue
Block a user