Open Source Telephony
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@canonical.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2] atmodem: fix crash during context deactivation
Date: Wed, 26 May 2010 18:06:59 +0300	[thread overview]
Message-ID: <87hbluk8h8.fsf@potku.valot.fi> (raw)
In-Reply-To: <1274862952.27220.147.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

Marcel Holtmann <marcel@holtmann.org> writes:

> Hi Kalle,

Hi Marcel,

>> Ofono either crashed or busy looped with my Huawei E1552 3G modem when I
>> tried to deactivate GPRS context. The reason was that gcd->chat was
>> unreferenced already in setup_ppp() but the chat was still accessed
>> later in at_gprs_deactivate_primary().
>> 
>> To fix the problem, change the logic instead to suspend chat session
>> for PPP and resume when PPP has disconnected. Now it doesn't crash
>> anymore.
>> 

[...]

>>  	if (gcd->state == STATE_ENABLING) {
>>  		CALLBACK_WITH_FAILURE(gcd->up_cb, NULL, FALSE, NULL,
>>  					NULL, NULL, NULL, gcd->cb_data);
>> -		return;
>> +	} else if (gcd->state == STATE_DISABLING) {
>> +		CALLBACK_WITH_SUCCESS(gcd->down_cb, gcd->cb_data);
>> +	} else {
>> +		ofono_gprs_context_deactivated(gc, gcd->active_context);
>>  	}
>
> the easier to read coding style here is noew clearly a switch statement.

Agree.


[...]

> The rest looks fine to me. However maybe splitting this into one patch
> that removes the CGACT and another that adds suspend/resume calls seems
> a bit cleaner to me.

I'll send v3 soon.

-- 
Kalle Valo

  reply	other threads:[~2010-05-26 15:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 14:56 [PATCH v2] atmodem: fix crash during context deactivation Kalle Valo
2010-05-26  7:05 ` Kalle Valo
2010-05-26  8:35 ` Marcel Holtmann
2010-05-26 15:06   ` Kalle Valo [this message]
2010-05-26 15:04 ` Zhang, Zhenhua
2010-05-26 15:33   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hbluk8h8.fsf@potku.valot.fi \
    --to=kalle.valo@canonical.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox