diff mbox

Mobile testing branch

Message ID 53F56FD6.9070404@gmail.com
State New
Headers show

Commit Message

Igor Almeida Aug. 21, 2014, 4:04 a.m. UTC
Hi,

On 07/30/2014 07:28 AM, Holger Hans Peter Freyther wrote:
> On Wed, Jul 30, 2014 at 10:54:39AM +0200, Milinko Isakovic wrote:
>> Hi I have same problem.
>
> Hi,
>
>> msgb(0x1638020): Not enough headroom msgb_push (4271669080 < 7)
>> backtrace() returned 10 addresses
>> /usr/local/lib/libosmocore.so.4(osmo_panic+0xb9) [0x7f2b4ea57929]
>> /usr/local/lib/libosmogsm.so.5(lapdm_phsap_up+0x16f) [0x7f2b4e62378f]
>> ./mobile() [0x43981c]
>> ./mobile() [0x439fce]
>> /usr/local/lib/libosmocore.so.4(osmo_wqueue_bfd_cb+0x93) [0x7f2b4ea550d3]
>> /usr/local/lib/libosmocore.so.4(osmo_select_main+0x1b1) [0x7f2b4ea54171]
>> ./mobile() [0x404be7]
>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f2b4e099eed]
>> ./mobile() [0x404d59]
>
> we are still waiting for a patch. The LAPDm code is using l2h/l3h but
> in rx_l1_rach_conf it is not initialized at all.
>
> Patches welcome.
>
The attached patch works for me. Anything I've missed?

> 	holger
>

Comments

Holger Freyther Aug. 22, 2014, 3:50 p.m. UTC | #1
On Thu, Aug 21, 2014 at 01:04:38AM -0300, Igor Almeida wrote:

Hi!


>  	dl = (struct l1ctl_info_dl *) msg->l1h;
> +	msg->l2h = msg->l3h = dl->payload;
>  

yes, looks fine. I had msg->l2h = msg->l3h = msg->tail but
dl->payload should probably work as well. I will leave it for
Sylvain/Andreas to comment.

thanks a lot for the patch

holger
Sylvain Munaut Aug. 22, 2014, 3:58 p.m. UTC | #2
On Fri, Aug 22, 2014 at 5:50 PM, Holger Hans Peter Freyther
<holger@freyther.de> wrote:
> On Thu, Aug 21, 2014 at 01:04:38AM -0300, Igor Almeida wrote:
>
> Hi!
>
>
>>       dl = (struct l1ctl_info_dl *) msg->l1h;
>> +     msg->l2h = msg->l3h = dl->payload;
>>
>
> yes, looks fine. I had msg->l2h = msg->l3h = msg->tail but
> dl->payload should probably work as well. I will leave it for
> Sylvain/Andreas to comment.
>
> thanks a lot for the patch

I'll give it a shot this week end when I have a osmocom-bb phone handy
and merge it.


Cheers,

   Sylvain
Sylvain Munaut Sept. 7, 2014, 8:22 a.m. UTC | #3
>>
>>>       dl = (struct l1ctl_info_dl *) msg->l1h;
>>> +     msg->l2h = msg->l3h = dl->payload;
>>>
>>
>> yes, looks fine. I had msg->l2h = msg->l3h = msg->tail but
>> dl->payload should probably work as well. I will leave it for
>> Sylvain/Andreas to comment.
>>
>> thanks a lot for the patch
>
> I'll give it a shot this week end when I have a osmocom-bb phone handy
> and merge it.

Merged thanks.

Sorry, it got delayed, life got in the way that weekend and I was just
reminded of it by someone having that issue in IRC ...

I think dl->payload makes sense since this is what's used to init it
in the other cases (like data_ind).


Cheers,

   Sylvain
diff mbox

Patch

From ef2b86acdfc78c3fd2725daea1d70a4904348c48 Mon Sep 17 00:00:00 2001
From: Igor Almeida <igor.contato@gmail.com>
Date: Thu, 21 Aug 2014 00:30:22 -0300
Subject: [PATCH] layer23: initialize l2h/l3h pointers

Signed-off-by: Igor Almeida <igor.contato@gmail.com>
---
 src/host/layer23/src/common/l1ctl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index 91bab89..c75872e 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -148,6 +148,7 @@  static int rx_l1_rach_conf(struct osmocom_ms *ms, struct msgb *msg)
 	}
 
 	dl = (struct l1ctl_info_dl *) msg->l1h;
+	msg->l2h = msg->l3h = dl->payload;
 
 	osmo_prim_init(&pp.oph, SAP_GSM_PH, PRIM_PH_RACH,
 			PRIM_OP_CONFIRM, msg);
-- 
2.0.1