All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB
@ 2011-05-19 13:03 Guillaume Zajac
  2011-05-19 16:11 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Zajac @ 2011-05-19 13:03 UTC (permalink / raw)
  To: ofono

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

---
 src/emulator.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c
index c17b901..251bed8 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -219,15 +219,19 @@ static void dun_ath_cb(GAtServer *server, GAtServerRequestType type,
 		if (val != 0)
 			goto error;
 
+		g_at_server_suspend(em->server);
 		g_at_ppp_unref(em->ppp);
 		em->ppp = NULL;
+		g_at_server_resume(em->server);
 
 		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
 		break;
 
 	case G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY:
+		g_at_server_suspend(em->server);
 		g_at_ppp_unref(em->ppp);
 		em->ppp = NULL;
+		g_at_server_resume(em->server);
 
 		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
 		break;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB
  2011-05-19 13:03 [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB Guillaume Zajac
@ 2011-05-19 16:11 ` Denis Kenzior
  2011-05-20  8:29   ` Guillaume Zajac
  2011-05-20  9:40   ` Guillaume Zajac
  0 siblings, 2 replies; 4+ messages in thread
From: Denis Kenzior @ 2011-05-19 16:11 UTC (permalink / raw)
  To: ofono

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

Hi Guillaume,

On 05/19/2011 08:03 AM, Guillaume Zajac wrote:
> ---
>  src/emulator.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/emulator.c b/src/emulator.c
> index c17b901..251bed8 100644
> --- a/src/emulator.c
> +++ b/src/emulator.c
> @@ -219,15 +219,19 @@ static void dun_ath_cb(GAtServer *server, GAtServerRequestType type,
>  		if (val != 0)
>  			goto error;
>  
> +		g_at_server_suspend(em->server);
>  		g_at_ppp_unref(em->ppp);
>  		em->ppp = NULL;
> +		g_at_server_resume(em->server);
>  
>  		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>  		break;
>  
>  	case G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY:
> +		g_at_server_suspend(em->server);
>  		g_at_ppp_unref(em->ppp);
>  		em->ppp = NULL;
> +		g_at_server_resume(em->server);
>  
>  		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>  		break;

This really sounds wrong.  I suggest that we not set the disconnect
function in GAtPPP when unrefing if GAtPPP is currently suspended.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB
  2011-05-19 16:11 ` Denis Kenzior
@ 2011-05-20  8:29   ` Guillaume Zajac
  2011-05-20  9:40   ` Guillaume Zajac
  1 sibling, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2011-05-20  8:29 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

On 19/05/2011 18:11, Denis Kenzior wrote:
> Hi Guillaume,
>
> On 05/19/2011 08:03 AM, Guillaume Zajac wrote:
>> ---
>>   src/emulator.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/emulator.c b/src/emulator.c
>> index c17b901..251bed8 100644
>> --- a/src/emulator.c
>> +++ b/src/emulator.c
>> @@ -219,15 +219,19 @@ static void dun_ath_cb(GAtServer *server, GAtServerRequestType type,
>>   		if (val != 0)
>>   			goto error;
>>
>> +		g_at_server_suspend(em->server);
>>   		g_at_ppp_unref(em->ppp);
>>   		em->ppp = NULL;
>> +		g_at_server_resume(em->server);
>>
>>   		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>>   		break;
>>
>>   	case G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY:
>> +		g_at_server_suspend(em->server);
>>   		g_at_ppp_unref(em->ppp);
>>   		em->ppp = NULL;
>> +		g_at_server_resume(em->server);
>>
>>   		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>>   		break;
> This really sounds wrong.  I suggest that we not set the disconnect
> function in GAtPPP when unrefing if GAtPPP is currently suspended.

Ok, I will do it like this.
When I will submit the resume functions associated to suspend functions, 
I will also have to take care about suspended state.

Kind regards,
Guillaume

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB
  2011-05-19 16:11 ` Denis Kenzior
  2011-05-20  8:29   ` Guillaume Zajac
@ 2011-05-20  9:40   ` Guillaume Zajac
  1 sibling, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2011-05-20  9:40 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

On 19/05/2011 18:11, Denis Kenzior wrote:
> Hi Guillaume,
>
> On 05/19/2011 08:03 AM, Guillaume Zajac wrote:
>> ---
>>   src/emulator.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/emulator.c b/src/emulator.c
>> index c17b901..251bed8 100644
>> --- a/src/emulator.c
>> +++ b/src/emulator.c
>> @@ -219,15 +219,19 @@ static void dun_ath_cb(GAtServer *server, GAtServerRequestType type,
>>   		if (val != 0)
>>   			goto error;
>>
>> +		g_at_server_suspend(em->server);
>>   		g_at_ppp_unref(em->ppp);
>>   		em->ppp = NULL;
>> +		g_at_server_resume(em->server);
>>
>>   		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>>   		break;
>>
>>   	case G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY:
>> +		g_at_server_suspend(em->server);
>>   		g_at_ppp_unref(em->ppp);
>>   		em->ppp = NULL;
>> +		g_at_server_resume(em->server);
>>
>>   		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>>   		break;
> This really sounds wrong.  I suggest that we not set the disconnect
> function in GAtPPP when unrefing if GAtPPP is currently suspended.

As it is bound to the escape sequence implementation and ATO0 CB,
I have included it into the v6 of escape sequence implementation.

Kind regards,
Guillaume

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-20  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-19 13:03 [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB Guillaume Zajac
2011-05-19 16:11 ` Denis Kenzior
2011-05-20  8:29   ` Guillaume Zajac
2011-05-20  9:40   ` Guillaume Zajac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.