FreeCalypso > hg > osmo-playpen
comparison smsc-daemon/gsup_rx.c @ 8:81386a48c463
smsc-daemon: set source_name in GSUP replies
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 25 Aug 2023 14:56:52 -0800 |
parents | cef4677a4cf8 |
children |
comparison
equal
deleted
inserted
replaced
7:22ddb71f6883 | 8:81386a48c463 |
---|---|
28 | 28 |
29 #include "logging.h" | 29 #include "logging.h" |
30 | 30 |
31 extern void record_mo_sm(struct osmo_gsup_message *gmsg); | 31 extern void record_mo_sm(struct osmo_gsup_message *gmsg); |
32 | 32 |
33 extern char smsc_ipa_name[]; | |
34 | |
33 static void send_gsup_response(struct osmo_gsup_client *gsupc, | 35 static void send_gsup_response(struct osmo_gsup_client *gsupc, |
34 struct osmo_gsup_message *orig_msg) | 36 struct osmo_gsup_message *orig_msg) |
35 { | 37 { |
36 struct osmo_gsup_message resp = {0}; | 38 struct osmo_gsup_message resp = {0}; |
37 struct msgb *resp_msg; | 39 struct msgb *resp_msg; |
38 | 40 |
39 resp.message_type = OSMO_GSUP_TO_MSGT_RESULT(orig_msg->message_type); | 41 resp.message_type = OSMO_GSUP_TO_MSGT_RESULT(orig_msg->message_type); |
40 OSMO_STRLCPY_ARRAY(resp.imsi, orig_msg->imsi); | 42 OSMO_STRLCPY_ARRAY(resp.imsi, orig_msg->imsi); |
41 resp.message_class = OSMO_GSUP_MESSAGE_CLASS_SMS; | 43 resp.message_class = OSMO_GSUP_MESSAGE_CLASS_SMS; |
42 resp.sm_rp_mr = orig_msg->sm_rp_mr; | 44 resp.sm_rp_mr = orig_msg->sm_rp_mr; |
45 resp.source_name = smsc_ipa_name; | |
46 resp.source_name_len = strlen(smsc_ipa_name) + 1; | |
43 resp.destination_name = orig_msg->source_name; | 47 resp.destination_name = orig_msg->source_name; |
44 resp.destination_name_len = orig_msg->source_name_len; | 48 resp.destination_name_len = orig_msg->source_name_len; |
45 | 49 |
46 resp_msg = osmo_gsup_client_msgb_alloc(); | 50 resp_msg = osmo_gsup_client_msgb_alloc(); |
47 OSMO_ASSERT(resp_msg); | 51 OSMO_ASSERT(resp_msg); |