[PATCH] ModemManager: gsm: Correctly set registration status when disabling

2011-05-18 Thread Nathan Williams
Pretty much like it says; without this, the circuit-switched status isn't
set back to UNKNOWN at disable time, which messes with the value returned by
gsm_reg_status().
Pesky integer types all being the same.

- Nathan
From ea36f0d7554a4c6a6ce3e9bb487c4c687cbd9798 Mon Sep 17 00:00:00 2001
From: Nathan Williams 
Date: Wed, 18 May 2011 20:37:49 -0400
Subject: [PATCH] gsm: Correctly set registration status when disabling.

Change-Id: I0629706985f273832ac3662acb260388d0e6ed83
---
 src/mm-generic-gsm.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c
index 58454da..1fa7235 100644
--- a/src/mm-generic-gsm.c
+++ b/src/mm-generic-gsm.c
@@ -1594,14 +1594,12 @@ disable_done (MMAtSerialPort *port,
 
 /* Clear out circuit-switched registration info... */
 reg_info_updated (self,
-  MM_GENERIC_GSM_REG_TYPE_CS,
-  TRUE, MM_MODEM_GSM_NETWORK_REG_STATUS_UNKNOWN,
+  TRUE, MM_GENERIC_GSM_REG_TYPE_CS, MM_MODEM_GSM_NETWORK_REG_STATUS_UNKNOWN,
   TRUE, NULL,
   TRUE, NULL);
 /* ...and packet-switched registration info */
 reg_info_updated (self,
-  MM_GENERIC_GSM_REG_TYPE_PS,
-  TRUE, MM_MODEM_GSM_NETWORK_REG_STATUS_UNKNOWN,
+  TRUE, MM_GENERIC_GSM_REG_TYPE_PS, MM_MODEM_GSM_NETWORK_REG_STATUS_UNKNOWN,
   TRUE, NULL,
   TRUE, NULL);
 }
-- 
1.7.3.1

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


RE: Adding connections via D-Bus is not (yet) supported

2011-05-18 Thread Jos Collin-ERS,HCLTech
Anytime.

From: Neil Durant [neildur...@gmail.com]
Sent: Wednesday, May 18, 2011 9:34 PM
To: Jos Collin-ERS,HCLTech
Subject: Re: Adding connections via D-Bus is not (yet) supported

Hi Jos,

On 18 May 2011 16:50, Jos Collin-ERS,HCLTech 
mailto:joscol...@hcl.com>> wrote:
In NM 0.8.x, NetworkManagerUserSettings does not export the add/delete 
functionality due to security reasons, as then any application in the user's 
session could read/write/delete network settings. But 
NetworkManagerSystemSettings provides those functionality. So if you are in a 
user session then adding/deleting a connection using 
NetworkManagerSystemSettings will ask the root password.

Excellent, thank-you, I'd somehow overlooked that functionality on 
NetworkManagerSystemSettings.  Tried it and it works a treat.  Many thanks! :)

Neil
--
Neil Durant
neildur...@gmail.com

::DISCLAIMER::
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

---
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


RE: Adding connections via D-Bus is not (yet) supported

2011-05-18 Thread Jos Collin-ERS,HCLTech
Hello Neil,

In NM 0.8.x, NetworkManagerUserSettings does not export the add/delete 
functionality due to security reasons, as then any application in the user's 
session could read/write/delete network settings. But 
NetworkManagerSystemSettings provides those functionality. So if you are in a 
user session then adding/deleting a connection using 
NetworkManagerSystemSettings will ask the root password.

Regards,
Jos Collin

From: networkmanager-list-boun...@gnome.org 
[networkmanager-list-boun...@gnome.org] On Behalf Of Neil Durant 
[neildur...@gmail.com]
Sent: Wednesday, May 18, 2011 8:34 PM
To: networkmanager-list@gnome.org
Subject: Adding connections via D-Bus is not (yet) supported

I'm trying to add a new connection to NetworkManager using d-bus so that my 
embedded Linux system can connect to a wireless network to which it receives 
credentials.  I've been trying to use AddConnection on the 
org.freedesktop.NetworkManagerSettings interface of 
/org/freedesktop/NetworkManagerSettings, on the 
org.freedesktop.NetworkManagerUserSettings bus, but I get the following error:

org.freedesktop.DBus.GLib.UnmappedError.Org.freedesktop.NetworkManagerSettings.AddFailed.Code0:
 add_connection: adding connections via D-Bus is not (yet) supported

I'm using NetworkManager 0.8.4 on Ubuntu 11.04.

Can anyone shed any light on this error?  Does a more recent NetworkManager 
support this, or am I'm trying to go about this the wrong way?

Neil
--
Neil Durant
neildur...@gmail.com

::DISCLAIMER::
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

---
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Adding connections via D-Bus is not (yet) supported

2011-05-18 Thread Neil Durant
I'm trying to add a new connection to NetworkManager using d-bus so that my
embedded Linux system can connect to a wireless network to which it receives
credentials.  I've been trying to use AddConnection on
the org.freedesktop.NetworkManagerSettings interface
of /org/freedesktop/NetworkManagerSettings, on
the org.freedesktop.NetworkManagerUserSettings bus, but I get the following
error:

org.freedesktop.DBus.GLib.UnmappedError.Org.freedesktop.NetworkManagerSettings.AddFailed.Code0:
add_connection: adding connections via D-Bus is not (yet) supported

I'm using NetworkManager 0.8.4 on Ubuntu 11.04.

Can anyone shed any light on this error?  Does a more recent NetworkManager
support this, or am I'm trying to go about this the wrong way?

Neil
-- 
Neil Durant
neildur...@gmail.com
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list