On 05 Feb 2016, at 12:41, Harald Welte
<laforge(a)gnumonks.org> wrote:
+struct phy_link *phy_link_create(void *ctx, int num)
+{
+ struct phy_link *plink = talloc_zero(ctx, struct phy_link);
+
+ if (phy_link_by_num(num))
+ return NULL;
+
+ plink = talloc_zero(ctx, struct phy_link);
small memleak. plink being assigned twice.
+struct phy_instance *phy_instance_create(struct phy_link *plink, int num)
+{
+ struct phy_instance *pinst = talloc_zero(plink, struct phy_instance);
+
+ if (phy_instance_by_num(plink, num))
+ return NULL;
+
+ pinst = talloc_zero(plink, struct phy_instance);
same small leak.
@@ -518,6 +522,7 @@ static int
mph_send_config_ciphering(struct gsm_lchan *lchan, struct sapi_cmd *c
l1if_fill_msg_hdr(&pcc->Header, msg, fl1h, cOCTVC1_MSG_TYPE_COMMAND,
cOCTVC1_GSM_MSG_TRX_MODIFY_PHYSICAL_CHANNEL_CIPHERING_CID);
+ pcc->TrxId.byTrxId = pinst->u.octphy.trx_id;
ah nice, is there another way we could check that all primitives have all zero based
indices set?
okay ran out of time here. The octphy change looked good, mechanical, already fixing
byTrxId assignment in case there will be more than one phy.
holger