forwarding fu

Change-Id: Id55cc48b0e7b818e34b90eed2da8008cceefc711
This commit is contained in:
Neels Hofmeyr
2019-11-11 07:05:07 +01:00
parent adeb6e7b5f
commit 045d7be024
4 changed files with 8 additions and 10 deletions

View File

@@ -180,7 +180,7 @@ static void defer_gsup_message_err(struct pending_gsup_message *m)
/* Forward spooled message for this IMSI to remote HLR. */
static void defer_gsup_message_send(struct pending_gsup_message *m, struct remote_hlr *remote_hlr)
{
LOG_GSUP_REQ(m->req, LOGL_DEBUG, "Forwarding deferred message to " OSMO_SOCKADDR_STR_FMT "\n",
LOG_GSUP_REQ(m->req, LOGL_INFO, "Forwarding deferred message to " OSMO_SOCKADDR_STR_FMT "\n",
OSMO_SOCKADDR_STR_FMT_ARGS(&remote_hlr->addr));
/* If sending fails, still discard. */
@@ -191,9 +191,7 @@ static void defer_gsup_message_send(struct pending_gsup_message *m, struct remot
return;
}
remote_hlr_msgb_send(remote_hlr, m->req->msg);
m->req->msg = NULL;
osmo_gsup_req_free(m->req);
remote_hlr_gsup_forward(remote_hlr, m->req);
m->req = NULL;
}
@@ -202,7 +200,7 @@ static void defer_gsup_message_pop(const char *imsi, struct remote_hlr *remote_h
{
struct pending_gsup_message *m, *n;
if (remote_hlr)
if (remote_hlr)
LOG_DGSM(imsi, LOGL_DEBUG, "Sending spooled GSUP messages to remote HLR at " OSMO_SOCKADDR_STR_FMT "\n",
OSMO_SOCKADDR_STR_FMT_ARGS(&remote_hlr->addr));
else
@@ -233,7 +231,7 @@ void dgsm_send_to_remote_hlr(const struct proxy_subscr *proxy_subscr, struct osm
return;
}
LOG_GSUP_REQ(req, LOGL_DEBUG, "Proxy: forwarding to " OSMO_SOCKADDR_STR_FMT "\n",
LOG_GSUP_REQ(req, LOGL_INFO, "Proxy: forwarding to " OSMO_SOCKADDR_STR_FMT "\n",
OSMO_SOCKADDR_STR_FMT_ARGS(&proxy_subscr->remote_hlr_addr));
remote_hlr = remote_hlr_get(&proxy_subscr->remote_hlr_addr, true);
@@ -251,7 +249,7 @@ void dgsm_send_to_remote_hlr(const struct proxy_subscr *proxy_subscr, struct osm
return;
}
remote_hlr_gsup_send(remote_hlr, req);
remote_hlr_gsup_forward(remote_hlr, req);
}
static void resolve_hlr_result_cb(struct osmo_mslookup_client *client,

View File

@@ -34,7 +34,7 @@
struct msgb *osmo_gsup_msgb_alloc(const char *label)
{
struct msgb *msg = msgb_alloc_headroom(1024+16, 16, label);
struct msgb *msg = msgb_alloc_headroom(1024+512, 512, label);
OSMO_ASSERT(msg);
return msg;
}

View File

@@ -172,7 +172,7 @@ int remote_hlr_msgb_send(struct remote_hlr *remote_hlr, struct msgb *msg)
return rc;
}
void remote_hlr_gsup_send(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req)
void remote_hlr_gsup_forward(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req)
{
int rc;
struct msgb *msg = osmo_gsup_msgb_alloc("GSUP proxy to remote HLR");

View File

@@ -24,4 +24,4 @@ struct remote_hlr {
struct remote_hlr *remote_hlr_get(const struct osmo_sockaddr_str *addr, bool create);
void remote_hlr_destroy(struct remote_hlr *remote_hlr);
int remote_hlr_msgb_send(struct remote_hlr *remote_hlr, struct msgb *msg);
void remote_hlr_gsup_send(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req);
void remote_hlr_gsup_forward(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req);