mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 13:03:33 +00:00
libmsc: Remove sup_init() to make SUP socket initialiaton generic.
This commit is contained in:
committed by
Ivan Kluchnikov
parent
a317e334c2
commit
924292977f
@@ -10,10 +10,11 @@
|
||||
(subscr) ? (subscr)->imsi : "---", \
|
||||
## args)
|
||||
|
||||
// Callback for both HLR/auth and USSD SUP sockets
|
||||
int sup_read_cb(struct gprs_gsup_client *sup_client, struct msgb *msg);
|
||||
|
||||
int subscr_query_auth_info(struct gsm_subscriber *subscr);
|
||||
int subscr_location_update(struct gsm_subscriber *subscr);
|
||||
int sup_init(struct gsm_network *net);
|
||||
|
||||
|
||||
int subscr_tx_uss_message(struct ss_request *req,
|
||||
struct gsm_subscriber *subscr);
|
||||
|
||||
@@ -513,7 +513,7 @@ static int subscr_rx_sup_message(struct gprs_gsup_client *sup_client, struct msg
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int sup_read_cb(struct gprs_gsup_client *sup_client, struct msgb *msg)
|
||||
int sup_read_cb(struct gprs_gsup_client *sup_client, struct msgb *msg)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -524,19 +524,3 @@ static int sup_read_cb(struct gprs_gsup_client *sup_client, struct msgb *msg)
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int sup_init(struct gsm_network *net)
|
||||
{
|
||||
const char *addr_str;
|
||||
|
||||
addr_str = "127.0.0.1";
|
||||
|
||||
net->hlr_sup_client = gprs_gsup_client_create(
|
||||
addr_str, 8183,
|
||||
&sup_read_cb);
|
||||
|
||||
if (!net->hlr_sup_client)
|
||||
return -1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -368,13 +368,15 @@ int main(int argc, char **argv)
|
||||
}
|
||||
printf("DB: Database prepared.\n");
|
||||
|
||||
//if (bsc_gsmnet->auth_policy == GSM_AUTH_POLICY_REMOTE) {
|
||||
rc = sup_init(bsc_gsmnet);
|
||||
if (rc < 0) {
|
||||
if (bsc_gsmnet->auth_policy == GSM_AUTH_POLICY_REMOTE) {
|
||||
bsc_gsmnet->hlr_sup_client = gprs_gsup_client_create(
|
||||
"127.0.0.1", 8183,
|
||||
&sup_read_cb);
|
||||
if (!bsc_gsmnet->hlr_sup_client) {
|
||||
LOGP(DSUP, LOGL_FATAL, "Cannot set up subscriber management\n");
|
||||
exit(2);
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
/* setup the timer */
|
||||
db_sync_timer.cb = db_sync_timer_cb;
|
||||
|
||||
Reference in New Issue
Block a user