aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-02 19:38:07 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-02 22:46:16 +0200
commitd36b3a84638d6db940387f0e18c98855202f554d (patch)
tree9d2d99fb8c17753ad3e79da9f21b8523d80dcec3
parente91cd2b0887b0ed41a3bb4c49e4478defd208554 (diff)
Revert "Add version to phy_instance"
This reverts commit 9eeb0b1a136fc8c24a86cb4d832c264674c10db0. This commit caused osmo-gsm-tester test runs for the sysmoBTS to fail with SIGABRT consistently. See below redmine issues. In osmo-bts-sysmo/l1_if.c, it uses talloc_asprintf to write to the char version[MAX_VERSION_LENGTH]; talloc_asprintf() however is intended to work on string buffers allocated by talloc, and attempts to reallocate version[]. Furthermore, it is not clear why the patch passes a 'data' arg to app_info_sys_compl_cb() that is not used. Hence I will revert this instead of trying to fix. Please resolve issues and re-submit. Related: OS#2316 OS#1614 Change-Id: I2c9fd5e6739c1750365c0241476ce4b1aa2df3d4
-rw-r--r--include/osmo-bts/phy_link.h2
-rw-r--r--src/osmo-bts-octphy/l1_oml.c5
-rw-r--r--src/osmo-bts-sysmo/l1_if.c4
3 files changed, 3 insertions, 8 deletions
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index 4d1dadb..e8fd7eb 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -75,7 +75,7 @@ struct phy_instance {
struct llist_head list;
int num;
char *description;
- char version[MAX_VERSION_LENGTH];
+
/* pointer to the PHY link to which we belong */
struct phy_link *phy_link;
diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c
index ccef231..4652e10 100644
--- a/src/osmo-bts-octphy/l1_oml.c
+++ b/src/osmo-bts-octphy/l1_oml.c
@@ -1140,14 +1140,14 @@ int l1if_check_app_sys_version(struct gsm_bts_trx *trx)
LOGP(DL1C, LOGL_INFO, "Tx APP-INFO-SYSTEM.req\n");
- return l1if_req_compl(fl1h, msg, app_info_sys_compl_cb, pinst);
+ return l1if_req_compl(fl1h, msg, app_info_sys_compl_cb, 0);
}
static int app_info_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp,
void *data)
{
char ver_hdr[32];
- struct phy_instance *pinst = data;
+
tOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP *air =
(tOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP *) resp->l2h;
@@ -1171,7 +1171,6 @@ static int app_info_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp,
talloc_replace(fl1h->info.app.name, fl1h, air->szName);
talloc_replace(fl1h->info.app.description, fl1h, air->szDescription);
talloc_replace(fl1h->info.app.version, fl1h, air->szVersion);
- osmo_strlcpy(pinst->version, ver_hdr, sizeof(pinst->version));
/* in a completion call-back, we take msgb ownership and must
* release it before returning */
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 418d3f5..60638e1 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1875,10 +1875,6 @@ int bts_model_phy_link_open(struct phy_link *plink)
hdl = pinst->u.sysmobts.hdl;
osmo_strlcpy(bts->sub_model, sysmobts_model(hdl->hw_info.model_nr, hdl->hw_info.trx_nr), sizeof(bts->sub_model));
- talloc_asprintf(pinst->version, "%u.%u dsp %u.%u.%u fpga %u.%u.%u",
- hdl->hw_info.ver_major, hdl->hw_info.ver_minor,
- hdl->hw_info.dsp_version[0], hdl->hw_info.dsp_version[1], hdl->hw_info.dsp_version[2],
- hdl->hw_info.fpga_version[0], hdl->hw_info.fpga_version[1], hdl->hw_info.fpga_version[2]);
phy_link_state_set(plink, PHY_LINK_CONNECTED);