mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
cosmetic: debug and error logging, comment tweaks
This commit is contained in:
@@ -445,6 +445,8 @@ static void cn_ranap_handle_co(void *ctx, ranap_message *message)
|
||||
rc = ranap_handle_co_iu_rel_req(ctx, &message->msg.iu_ReleaseRequestIEs);
|
||||
break;
|
||||
default:
|
||||
LOGP(DRANAP, LOGL_ERROR, "Received Initiating Message: unknown Procedure Code %d\n",
|
||||
message->procedureCode);
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
@@ -460,8 +462,14 @@ static void cn_ranap_handle_co(void *ctx, ranap_message *message)
|
||||
/* Iu Release Complete */
|
||||
LOGP(DRANAP, LOGL_NOTICE, "FIXME: Handle Iu release complete\n");
|
||||
rc = global_iu_event_cb(ctx, IU_EVENT_IU_RELEASE, NULL);
|
||||
if (rc) {
|
||||
LOGP(DRANAP, LOGL_ERROR, "Iu Release event: Iu Event callback returned %d\n",
|
||||
rc);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOGP(DRANAP, LOGL_ERROR, "Received Successful Outcome: unknown Procedure Code %d\n",
|
||||
message->procedureCode);
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
@@ -474,6 +482,8 @@ static void cn_ranap_handle_co(void *ctx, ranap_message *message)
|
||||
}
|
||||
case RANAP_RANAP_PDU_PR_unsuccessfulOutcome:
|
||||
default:
|
||||
LOGP(DRANAP, LOGL_ERROR, "Received Unsuccessful Outcome: Procedure Code %d\n",
|
||||
message->procedureCode);
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
@@ -564,6 +574,14 @@ static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi,
|
||||
struct iu_rnc *rnc;
|
||||
int pagings_sent = 0;
|
||||
|
||||
LOGP(DRANAP, LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s"
|
||||
" (paging will use %s)\n",
|
||||
is_ps? "IuPS" : "IuCS",
|
||||
imsi,
|
||||
tmsi_or_ptimsi ? (is_ps? "PTMSI" : "TMSI")
|
||||
: "IMSI"
|
||||
);
|
||||
|
||||
llist_for_each_entry(rnc, &rnc_list, entry) {
|
||||
if (!rnc->link) {
|
||||
/* Not actually connected, don't count it. */
|
||||
@@ -576,8 +594,13 @@ static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi,
|
||||
|
||||
/* Found a match! */
|
||||
if (iu_tx_paging_cmd(rnc->link, imsi, tmsi_or_ptimsi, is_ps, 0)
|
||||
== 0)
|
||||
== 0) {
|
||||
LOGP(DRANAP, LOGL_DEBUG,
|
||||
"%s: Paged for IMSI %s on RNC %d, on SUA link %p\n",
|
||||
is_ps? "IuPS" : "IuCS",
|
||||
imsi, rnc->rnc_id, rnc->link);
|
||||
pagings_sent ++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Some logging... */
|
||||
|
@@ -985,10 +985,14 @@ int gsm411_send_sms_subscr(struct gsm_subscriber *subscr,
|
||||
* if yes, send the SMS this way */
|
||||
conn = connection_for_subscr(subscr);
|
||||
if (conn) {
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS via already open connection %p to %s\n",
|
||||
conn, subscr_name(subscr));
|
||||
return gsm411_send_sms(conn, sms);
|
||||
}
|
||||
|
||||
/* if not, we have to start paging */
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS: no connection open, start paging %s\n",
|
||||
subscr_name(subscr));
|
||||
res = subscr_request_channel(subscr, RSL_CHANNEED_SDCCH,
|
||||
paging_cb_send_sms, sms);
|
||||
if (!res) {
|
||||
|
@@ -188,7 +188,7 @@ struct subscr_request *subscr_request_channel(struct gsm_subscriber *subscr,
|
||||
|
||||
/* Start paging.. we know it is async so we can do it before */
|
||||
if (!subscr->is_paging) {
|
||||
LOGP(DMM, LOGL_DEBUG, "Subscriber %s not paged yet.\n",
|
||||
LOGP(DMM, LOGL_DEBUG, "Subscriber %s not paged yet, start paging.\n",
|
||||
subscr_name(subscr));
|
||||
rc = msc_paging_request(subscr->group->net, subscr, channel_type,
|
||||
subscr_paging_cb, subscr);
|
||||
@@ -200,6 +200,12 @@ struct subscr_request *subscr_request_channel(struct gsm_subscriber *subscr,
|
||||
/* reduced on the first paging callback */
|
||||
subscr_get(subscr);
|
||||
subscr->is_paging = 1;
|
||||
LOGP(DMM, LOGL_DEBUG, "Paged subscriber %s.\n",
|
||||
subscr_name(subscr));
|
||||
}
|
||||
else {
|
||||
LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n",
|
||||
subscr_name(subscr));
|
||||
}
|
||||
|
||||
/* TODO: Stop paging in case of memory allocation failure */
|
||||
|
@@ -60,6 +60,7 @@ static inline void log_subscribers(struct gsm_network *network)
|
||||
break;
|
||||
case IFACE_A:
|
||||
DEBUGPC(DIUCS, " A");
|
||||
/* TODO log A-interface connection details */
|
||||
break;
|
||||
case IFACE_UNKNOWN:
|
||||
DEBUGPC(DIUCS, " ?");
|
||||
|
@@ -332,7 +332,7 @@ static int rcvmsg_iu_cs(struct msgb *msg, struct gprs_ra_id *ra_id, /* FIXME gpr
|
||||
static int rx_iu_event(struct ue_conn_ctx *ctx, enum iu_event_type type,
|
||||
void *data)
|
||||
{
|
||||
DEBUGP(DIUCS, "got Iu-CS event %u\n", type);
|
||||
DEBUGP(DIUCS, "got IuCS event %u\n", type);
|
||||
|
||||
return iucs_rx_ranap_event(cscn_network, ctx, type, data);
|
||||
}
|
||||
@@ -489,7 +489,7 @@ TODO: we probably want some of the _net_ ctrl commands from bsc_base_ctrl_cmds_i
|
||||
/* Set up A-Interface */
|
||||
/* TODO: implement A-Interface and remove above legacy stuff. */
|
||||
|
||||
/* Set up Iu-CS */
|
||||
/* Set up IuCS */
|
||||
iu_init(tall_cscn_ctx, "127.0.0.1", 14001, rcvmsg_iu_cs, rx_iu_event);
|
||||
|
||||
if (cscn_cmdline_config.daemonize) {
|
||||
|
Reference in New Issue
Block a user