[PATCH] ui: Mark 'Advanced...' as translatable

2011-08-17 Thread Ozan Çağlayan
---
 properties/nm-vpnc-dialog.ui |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 NOTE: Should be applied to NM_0_8 branch too.

diff --git a/properties/nm-vpnc-dialog.ui b/properties/nm-vpnc-dialog.ui
index 45d2796..9d5aa4c 100644
--- a/properties/nm-vpnc-dialog.ui
+++ b/properties/nm-vpnc-dialog.ui
@@ -664,7 +664,7 @@
 0
 
   
-Advanced...
+Advanced...
 True
 True
 True
-- 
1.7.6

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


[PATCH] Fix gtk_builder_set_translation_domain() calling

2011-08-17 Thread Ozan Çağlayan
gtk_builder_set_translation_domain() should be called before
gtk_builder_add_from_file(). This fixes UI messages always in English
problem.
---
 properties/nm-vpnc.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

 NOTE: This should also be applied to NetworkManager-vpnc NM_0_8 branch.

diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 34f4fc0..86d37eb 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -927,6 +927,8 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-vpnc-dialog.ui");
priv->builder = gtk_builder_new ();
 
+   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
g_warning ("Couldn't load builder file: %s",
   error && *error ? (*error)->message : "(unknown)");
@@ -939,8 +941,6 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
}
g_free (ui_file);
 
-   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
-
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, 
"vpnc-vbox"));
if (!priv->widget) {
g_set_error (error, VPNC_PLUGIN_UI_ERROR, 0, "could not load UI 
widget");
-- 
1.7.6

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


[PATCH] Fix gtk_builder_set_translation_domain() calling

2011-08-17 Thread Ozan Çağlayan
gtk_builder_set_translation_domain() should be called before
gtk_builder_add_from_file(). This fixes UI messages always in English
problem.
---
 properties/advanced-dialog.c |2 +-
 properties/nm-pptp.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

 NOTE: This should also be applied to NetworkManager-pptp NM_0_8 branch.

diff --git a/properties/advanced-dialog.c b/properties/advanced-dialog.c
index 3c5b23b..a71e356 100644
--- a/properties/advanced-dialog.c
+++ b/properties/advanced-dialog.c
@@ -414,6 +414,7 @@ advanced_dialog_new (GHashTable *hash)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-pptp-dialog.ui");
builder = gtk_builder_new ();
 
+   gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
if (!gtk_builder_add_from_file (builder, ui_file, &error)) {
g_warning ("Couldn't load builder file: %s",
   error ? error->message : "(unknown)");
@@ -421,7 +422,6 @@ advanced_dialog_new (GHashTable *hash)
g_object_unref (G_OBJECT (builder));
goto out;
}
-   gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
 
dialog = GTK_WIDGET (gtk_builder_get_object (builder, 
"pptp-advanced-dialog"));
if (!dialog) {
diff --git a/properties/nm-pptp.c b/properties/nm-pptp.c
index b24461a..d2303ce 100644
--- a/properties/nm-pptp.c
+++ b/properties/nm-pptp.c
@@ -404,6 +404,8 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-pptp-dialog.ui");
priv->builder = gtk_builder_new ();
 
+   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
g_warning ("Couldn't load builder file: %s",
   error && *error ? (*error)->message : "(unknown)");
@@ -416,8 +418,6 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
}
g_free (ui_file);
 
-   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
-
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, 
"pptp-vbox"));
if (!priv->widget) {
g_set_error (error, PPTP_PLUGIN_UI_ERROR, 0, "could not load UI 
widget");
-- 
1.7.6

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


[PATCH] Fix gtk_builder_set_translation_domain() calling

2011-08-17 Thread Ozan Çağlayan
gtk_builder_set_translation_domain() should be called before
gtk_builder_add_from_file(). This fixes UI messages always in English
problem.
---
 properties/auth-helpers.c |4 ++--
 properties/nm-openvpn.c   |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

NOTE: This should also be applied to NM_0_8 branch.

diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 9112e34..8d4764e 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1308,6 +1308,8 @@ advanced_dialog_new (GHashTable *hash, const char 
*contype)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openvpn-dialog.ui");
builder = gtk_builder_new ();
 
+   gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (builder, ui_file, &error)) {
g_warning ("Couldn't load builder file: %s", error->message);
g_error_free (error);
@@ -1315,8 +1317,6 @@ advanced_dialog_new (GHashTable *hash, const char 
*contype)
goto out;
}
 
-   gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
-
dialog = GTK_WIDGET (gtk_builder_get_object (builder, 
"openvpn-advanced-dialog"));
if (!dialog) {
g_object_unref (G_OBJECT (builder));
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 13f0431..3e09869 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -507,6 +507,8 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openvpn-dialog.ui");
priv->builder = gtk_builder_new ();
 
+   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
g_warning ("Couldn't load builder file: %s",
   error && *error ? (*error)->message : "(unknown)");
@@ -518,8 +520,6 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
return NULL;
}
 
-   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
-
g_free (ui_file);
 
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, 
"openvpn-vbox"));
-- 
1.7.6

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


[PATCH] Fix gtk_builder_set_translation_domain() calling

2011-08-17 Thread Ozan Çağlayan
gtk_builder_set_translation_domain() should be called before
gtk_builder_add_from_file(). This fixes UI messages always in English
problem.
---
 properties/nm-openconnect.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 2c3499f..81aaad9 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -508,6 +508,8 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openconnect-dialog.ui");
priv->builder = gtk_builder_new ();
 
+   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+
if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
g_warning ("Couldn't load builder file: %s",
   error && *error ? (*error)->message : "(unknown)");
@@ -520,8 +522,6 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection 
*connection, GError **error)
}
g_free (ui_file);
 
-   gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
-
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, 
"openconnect-vbox"));
if (!priv->widget) {
g_set_error (error, OPENCONNECT_PLUGIN_UI_ERROR, 0, "could not 
load UI widget");
-- 
1.7.6

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


Re: [PATCH] Fix saving secrets in system scope

2011-08-17 Thread Ozan Çağlayan

Ozan Çağlayan yazdı 17-08-2011 13:51 tarihinde:

---
  properties/nm-pptp.c |   11 +++
  1 files changed, 11 insertions(+), 0 deletions(-)

This is for NM_0_8 branch. Patch is inspired from the similar one from 
OpenVPN plugin.

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


[PATCH] Fix saving secrets in system scope

2011-08-17 Thread Ozan Çağlayan
---
 properties/nm-pptp.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/properties/nm-pptp.c b/properties/nm-pptp.c
index 39f2447..bc43a79 100644
--- a/properties/nm-pptp.c
+++ b/properties/nm-pptp.c
@@ -408,6 +408,17 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
if (priv->advanced)
g_hash_table_foreach (priv->advanced, hash_copy_advanced, 
s_vpn);
 
+   /* System secrets get stored in the connection, user secrets are saved
+* via the save_secrets() hook.
+*/
+   if (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) 
{
+   widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, 
"user_password_entry"));
+   str = gtk_entry_get_text (GTK_ENTRY (widget));
+   if (str && strlen (str)) {
+   nm_setting_vpn_add_secret(s_vpn, NM_PPTP_KEY_PASSWORD, 
str);
+   }
+   }
+
nm_connection_add_setting (connection, NM_SETTING (s_vpn));
valid = TRUE;
 
-- 
1.7.6

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


Hard dependency on gtk+ 2.24 in vpnc plugin

2011-08-12 Thread Ozan Çağlayan

Hi,

The UI file of the vpnc plugin requires gtk+ >= 2.24. Is this really 
true? If that line is removed in the .ui file, the UI is correctly shown 
with gtk+ 2.22.x.


Regards,

--
Ozan Çağlayan
Open Source software developer
Pardus Linux

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


Localization problems in VPN plugins

2011-08-11 Thread Ozan Çağlayan

Hi,

After migrating from glade to .ui files, eventhough the .mo files 
contains the translated strings for the VPN plugins, they're always in 
English. This is with NM, NM-applet and plugins all at their latest 
0.8.x releases. The missing strings are always coming from the .ui files.


Any ideas?

--
Ozan Çağlayan
Open Source software developer
Pardus Linux

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


Missing glade annotations in VPN plugins

2011-08-11 Thread Ozan Çağlayan

Hi,

After migrating from glade to gtkbuilder, POTFILES.in files in all of 
the NM_0_8 VPN branches are wrong as they don't include the [type: 
gettext/glade] annotation needed for correct message extraction. The 
changes were made to the master branches but not backported to 0.8 branches.


Regards,

--
Ozan Çağlayan
Open Source software developer
Pardus Linux

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


Re: Idea - Detecting IP conflicts in NM

2011-04-28 Thread Ozan Çağlayan
On 27.04.2011 22:29, Dan Williams wrote:

>> follow-up for gratuitous arp replies:
>>  http://forum.nginx.org/read.php?31,75057
> 
> This would be cool; we could do it after getting the IP address if we
> wanted to in nm-device.c or elsewhere before we've even assigned the IP
> address to the card.  Alternatively, if we wanted to keep lower latency
> we could do it after we've assigned the address and said we're connected
> like other OSs do and warn the user or something.  Is this a patch you'd
> be willing to work on?  If so that would be great!

Not yet. I've played with the duplicate address detection (DAD) mode of
the arping tool but it seems that on systems that I've tried, the
endpoints don't reply to gratuitous ARPs. There's probably a /proc/*
tunable that's disabled by default which ignores those requests.

Applets can even offer getting an IP from the DHCP server in case of
conflicting IP situations or alternatively, NM can assign the IP but
applets can warn the user about the situation (or even a limited or
problematic connection icon can be overlayed on the applet's icon in the
tray)

Seen that it's acceptable from upstream, I'll try to implement this
step-by-step.

Thanks!

-- 
Ozan Caglayan

Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Idea - Detecting IP conflicts in NM

2011-04-22 Thread Ozan Çağlayan
On 22.04.2011 11:36, Ozan Çağlayan wrote:
> 
> Maybe the functionality of this daemon can be integrated into NM, or if
> the kernel now replies to Gratuitous ARP requests, the task will be much
> easier.

follow-up for gratuitous arp replies:
 http://forum.nginx.org/read.php?31,75057


-- 
Ozan Caglayan

Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Idea - Detecting IP conflicts in NM

2011-04-22 Thread Ozan Çağlayan
http://ipwatchd.sourceforge.net/ipwatchd-whitepaper.pdf
http://wiki.wireshark.org/Gratuitous_ARP

There's an old project called ipwatchd to detect and notify users about
IP conflicts. Currently there's no way in NM to detect these kind of
conflicts causing the same IP to be used by different hosts.

Maybe the functionality of this daemon can be integrated into NM, or if
the kernel now replies to Gratuitous ARP requests, the task will be much
easier.

Ideas, thoughts?


-- 
Ozan Caglayan

Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: WLAN disabled by state file

2011-03-07 Thread Ozan Çağlayan
On 07.03.2011 19:01, Dan Williams wrote:

> That message can only come from a user applet property set request from
> D-Bus.

Actually this came to my mind right after posting the e-mail. It is the
new KDE4 applet. Should I blame it for this problem?


Ozan Caglayan

--
Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: WLAN disabled by state file

2011-03-06 Thread Ozan Çağlayan
On 05.03.2011 17:31, Dan Williams wrote:

> Need a bit more debug here; the --log-level=debug logs would be useful
> for starters.
> 
> Dan

Ok, the logs are attached. (This is the new NM 0.8.3.997)

Thanks,


-- 
Pardus Linux
http://www.pardus.org.tr/eng
After pressing the rfkill button on laptop:
---

NetworkManager[15750]:  [1299426967.981710] [nm-netlink-monitor.c:117] 
link_msg_handler(): netlink link message: iface idx 4 flags 0x1002
NetworkManager[15750]:  [1299426967.984006] [nm-netlink-monitor.c:117] 
link_msg_handler(): netlink link message: iface idx 4 flags 0x1043
NetworkManager[15750]:  [1299426967.984789] [nm-udev-manager.c:477] 
handle_uevent(): UDEV event: action 'change' subsys 'rfkill' device 'rfkill2'
NetworkManager[15750]:  [1299426967.984948] [nm-udev-manager.c:204] 
recheck_killswitches(): WiFi rfkill state now 'soft-blocked'
NetworkManager[15750]:  [1299426967.984983] [nm-manager.c:1854] 
manager_rfkill_update_one_type(): WiFi hw-enabled 1 sw-enabled 0
NetworkManager[15750]:  WiFi now disabled by radio killswitch
NetworkManager[15750]:  [1299426967.985045] [nm-manager.c:1690] 
manager_update_radio_enabled(): (wlan0): setting radio disabled
NetworkManager[15750]:  [1299426967.985064] [nm-device-wifi.c:3757] 
real_set_enabled(): (wlan0): device now disabled
NetworkManager[15750]:  (wlan0): device state change: 8 -> 2 (reason 0)
NetworkManager[15750]:  (wlan0): deactivating device (reason: 0).
dhcpcd[15754]: received SIGTERM, stopping
dhcpcd[15754]: wlan0: removing interface
NetworkManager[15750]:  (wlan0): canceled DHCP transaction, DHCP client 
pid 15754
NetworkManager[15750]:  [1299426968.185839] [nm-device-wifi.c:1165] 
_set_hw_addr(): (wlan0): no MAC address change needed
NetworkManager[15750]:  [1299426968.185900] [nm-system.c:1362] 
flush_routes(): (wlan0): flushing routes ifindex 4 family INET (2)
NetworkManager[15750]:  [1299426968.186049] [nm-system.c:1277] 
dump_route():   route idx 1 family INET (2) addr 127.0.0.0/8
NetworkManager[15750]:  [1299426968.186076] [nm-system.c:1277] 
dump_route():   route idx 1 family INET (2) addr 127.255.255.255/32
NetworkManager[15750]:  [1299426968.186103] [nm-system.c:1277] 
dump_route():   route idx 1 family INET (2) addr 127.0.0.0/32
NetworkManager[15750]:  [1299426968.186136] [nm-system.c:1277] 
dump_route():   route idx 1 family INET (2) addr 127.0.0.1/32
NetworkManager[15750]:  [1299426968.186166] [nm-system.c:1277] 
dump_route():   route idx 1 family INET (2) addr 127.0.0.0/8
NetworkManager[15750]:  [1299426968.186203] [nm-system.c:1277] 
dump_route():   route idx 1 family INET6 (10) addr 0:0:6100::903b:6502/0
NetworkManager[15750]:  [1299426968.186236] [nm-system.c:1277] 
dump_route():   route idx 1 family INET6 (10) addr ::1/128
NetworkManager[15750]:  [1299426968.186270] [nm-system.c:1277] 
dump_route():   route idx 1 family INET6 (10) addr 0:0:9100::5812:2306/0
NetworkManager[15750]:  [1299426968.186399] [nm-system.c:222] 
sync_addresses(): (wlan0): syncing addresses (family 2)
NetworkManager[15750]:  [1299426968.639413] [nm-device-wifi.c:1331] 
real_is_available(): (wlan0): not available because not enabled
NetworkManager[15750]:  [1299426968.639463] [nm-device.c:3792] 
nm_device_state_changed(): (wlan0): device not yet available for transition to 
DISCONNECTED
NetworkManager[15750]:  (pid 15754) unhandled DHCP event for interface 
wlan0
NetworkManager[15750]:  [1299426968.647490] [nm-netlink-monitor.c:117] 
link_msg_handler(): netlink link message: iface idx 4 flags 0x1002
NetworkManager[15750]:  [1299426968.665704] [nm-manager.c:4456] 
manager_radio_user_toggled(): (WiFi): setting radio disabled by user


Now the WirelessEnabled key turned to false in /var/lib/NetworkManager.state 
file. Pressing the
rfkill button again doesn't set WirelessEnabled to true again:


NetworkManager[15750]:  [1299427091.367610] [nm-udev-manager.c:477] 
handle_uevent(): UDEV event: action 'change' subsys 'rfkill' device 'rfkill2'
NetworkManager[15750]:  [1299427091.367902] [nm-udev-manager.c:204] 
recheck_killswitches(): WiFi rfkill state now 'unblocked'
NetworkManager[15750]:  [1299427091.367988] [nm-manager.c:1854] 
manager_rfkill_update_one_type(): WiFi hw-enabled 1 sw-enabled 1
NetworkManager[15750]:  WiFi now enabled by radio killswitch
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: WLAN disabled by state file

2011-03-05 Thread Ozan Çağlayan
On 09.02.2011 19:50, Ozan Çağlayan wrote:

> I think there are multiple issues in here. The one that I've mentioned
> in the original thread and you've commented about may be triggered by
> the bug that I've replied.
> 
> So with NM 0.8.2 on my Toshiba Portege R700 (iwlagn, exposing only a
> soft rfkill which is correctly turning on/off on keypress), when I
> sw-kill the radio, this is correctly detected by NM. The "Enable
> Wireless" gets unchecked and WirelessEnabled=false is written to the
> state file.
> 
> But when I unblock, NM detects this to some point (looking at the
> debugged outputs and the code) but doesn't update the state file and
> doesn't enable the wireless networking. So one should explicitly check
> the "enable wireless" every time after unblocking the rfkill.
> 
> I think this should be fixed. I'd like to debug more but I'm really
> getting lost in the glib/gobject mechanisms and NM code which contains a
> lot of abstraction/callback stuff really hard to follow :(
> 
> 

Ping? Any idea before 0.8.4 gets released?

-- 
Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: WLAN disabled by state file

2011-02-09 Thread Ozan Çağlayan

On 09.02.2011 18:40, Dan Williams wrote:



In current NM 0.8.x git, if you uncheck "Enable Wireless" from the menu,
NM writes that to the state file.  That will then be in-force until you
re-check "Enable Wireless", even across reboots.  This takes precedence
over rfkill because it was an explicit user choice to disable wifi.
This fix was included in NM 0.8.2.

I don't think we should be relying on rfkill here, because then it's
simply magic what happens on reboot.  Some laptops expose multiple
rfkill "switches" in the kernel, others expose one, some chain them
together, etc.  It's a big mess really, and trying to rely on the kernel
behavior here isn't going to help much.  Instead, I think it's a lot
clearer that "If you turn off wifi it stays disabled til you turn it
back on".  Or?


I think there are multiple issues in here. The one that I've mentioned 
in the original thread and you've commented about may be triggered by 
the bug that I've replied.


So with NM 0.8.2 on my Toshiba Portege R700 (iwlagn, exposing only a 
soft rfkill which is correctly turning on/off on keypress), when I 
sw-kill the radio, this is correctly detected by NM. The "Enable 
Wireless" gets unchecked and WirelessEnabled=false is written to the 
state file.


But when I unblock, NM detects this to some point (looking at the 
debugged outputs and the code) but doesn't update the state file and 
doesn't enable the wireless networking. So one should explicitly check 
the "enable wireless" every time after unblocking the rfkill.


I think this should be fixed. I'd like to debug more but I'm really 
getting lost in the glib/gobject mechanisms and NM code which contains a 
lot of abstraction/callback stuff really hard to follow :(



--
Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH 1/2] logging: Strip '\n' at the end of syslog() calls

2011-02-07 Thread Ozan Çağlayan
syslog already ensures that the messages are splitted by \n
boundaries. Appending another \n in NM pollutes the logging:

Feb  7 22:00:55 2011 NetworkManager[890]:  ...

Feb  7 22:00:56 2011 NetworkManager[890]:  ...

Feb  7 22:00:57 2011 NetworkManager[890]:  ...

etc.
---
 src/logging/nm-logging.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c
index 01bbb36..84cf16f 100644
--- a/src/logging/nm-logging.c
+++ b/src/logging/nm-logging.c
@@ -237,14 +237,14 @@ void _nm_log (const char *loc,
 
if ((log_level & LOGL_DEBUG) && (level == LOGL_DEBUG)) {
g_get_current_time (&tv);
-   syslog (LOG_INFO, " [%ld.%ld] [%s] %s(): %s\n", 
tv.tv_sec, tv.tv_usec, loc, func, msg);
+   syslog (LOG_INFO, " [%ld.%ld] [%s] %s(): %s", tv.tv_sec, 
tv.tv_usec, loc, func, msg);
} else if ((log_level & LOGL_INFO) && (level == LOGL_INFO))
-   syslog (LOG_INFO, " %s\n", msg);
+   syslog (LOG_INFO, " %s", msg);
else if ((log_level & LOGL_WARN) && (level == LOGL_WARN))
-   syslog (LOG_WARNING, " %s\n", msg);
+   syslog (LOG_WARNING, " %s", msg);
else if ((log_level & LOGL_ERR) && (level == LOGL_ERR)) {
g_get_current_time (&tv);
-   syslog (LOG_ERR, " [%ld.%ld] [%s] %s(): %s\n", 
tv.tv_sec, tv.tv_usec, loc, func, msg);
+   syslog (LOG_ERR, " [%ld.%ld] [%s] %s(): %s", tv.tv_sec, 
tv.tv_usec, loc, func, msg);
}
g_free (msg);
 }
-- 
1.7.3.4

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


[PATCH 2/2] src/main.c: Fix RFKILL logging domain

2011-02-07 Thread Ozan Çağlayan
Correct logging domain for RFKILL is RFKILL not RKILL.

Also fix the man page.
---
 man/NetworkManager.conf.5.in |2 +-
 src/main.c   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in
index a45adde..2d7a9e8 100644
--- a/man/NetworkManager.conf.5.in
+++ b/man/NetworkManager.conf.5.in
@@ -160,7 +160,7 @@ from earlier levels; thus setting the log level to INFO 
also logs error and
 warning messages.
 .TP
 .B domains=\fI,, ...\fP
-The following log domains are available: [NONE, HW, RKILL, ETHER, WIFI, BT, MB,
+The following log domains are available: [NONE, HW, RFKILL, ETHER, WIFI, BT, 
MB,
 DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT,
 USER_SET, SYS_SET, SUSPEND, CORE, DEVICE, OLPC, WIMAX].  When "NONE" is given 
by
 itself, logging is disabled.  MB = Mobile Broadband, USER_SET = user settings
diff --git a/src/main.c b/src/main.c
index 1e3db21..211a5b9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -482,7 +482,7 @@ main (int argc, char *argv[])
{ "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of 
plugins separated by ','", "plugin1,plugin2" },
{ "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log 
level: one of [ERR, WARN, INFO, DEBUG]", "INFO" },
{ "log-domains", 0, 0, G_OPTION_ARG_STRING, &log_domains,
-   "Log domains separated by ',': any combination of 
[NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]",
+   "Log domains separated by ',': any combination of 
[NONE,HW,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]",
"HW,RFKILL,WIFI" },
{NULL}
};
-- 
1.7.3.4

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


Re: WLAN disabled by state file

2011-02-07 Thread Ozan Çağlayan

On 03.02.2011 13:00, Ozan Çağlayan wrote:

Hi,


And there's also another bug that I can reproduce:

1. Connect using WiFi
2. Soft block WiFi (result: sw_enabled=0, hw_enabled=1)
3. state file is updated to WirelessEnabled=false
4. Unblock wifi (result: sw_enabled=1, hw_enabled=1)
5. state file is not updated and stays the same
6. WiFi doesn't come up automatically unless the "Enable wireless 
networking" is clicked in the UI.


--
Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


WLAN disabled by state file

2011-02-03 Thread Ozan Çağlayan
Hi,

I have bug reports about some inconsistencies caused by the state file and 
rfkill
interactions like when the user kills the radio and then re-enables it, the 
WLAN can't be enabled
unless the state file is edited manually as root, etc.

I think that when the system is booted, NM should ignore the state values in 
the state file and
should rely only on the rfkill status. When the user disables the WLAN through 
nm-applet or another
GUI, NM can internally remember this without needing that state file.

Can someone explain how the logic currently works?



---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to start a wireless connection at boot time?

2011-01-31 Thread Ozan Çağlayan

On 31.01.2011 01:19, Tom Epperly wrote:



It seems that the NetworkManager configuration is associated with a
particular user account, and it only activates the wireless when the
MythTV startup works and the user is automatically logged in. Is there
a way to make NetworkManager start up the wireless connection
immediately (without waiting for a user login)?  I also want the
wireless network on and connected to the access point regardless of
whether any particular user is logged in. Is this doable?


You have to create a system-wide connection. Put a check in "Available 
to all users" checkbox when creating a connection in nm-applet.



--
Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] backends/pardus: Add nscd support

2011-01-27 Thread Ozan Çağlayan
Now that we're running nscd by default, restart it on DNS changes
and invalidate hosts cache.
---
 src/backends/NetworkManagerPardus.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/backends/NetworkManagerPardus.c 
b/src/backends/NetworkManagerPardus.c
index d952cf3..a5af94e 100644
--- a/src/backends/NetworkManagerPardus.c
+++ b/src/backends/NetworkManagerPardus.c
@@ -52,6 +52,9 @@ void nm_system_enable_loopback (void)
  */
 void nm_system_update_dns (void)
 {
-   /* I'm not running nscd */
+   /* Check if the daemon was already running - do not start a new 
instance */
+   if (g_file_test("/var/run/nscd/socket", G_FILE_TEST_EXISTS))
+   nm_spawn_process ("/bin/service nscd restart");
+   nm_spawn_process ("/usr/sbin/nscd -i hosts");
 }
 
-- 
1.7.3.4

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


Re: Glib2 issues in NetworkManger

2010-12-09 Thread Ozan Çağlayan
On 09.12.2010 19:18, Robert Gabriel wrote:
> Since a small update of glib2 Im getting this error when shutting down
> NetworkManager:

I'm having similar traces too which even avoids the system from 
rebooting/halting while experimenting systemd.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Persistent hostname issues

2010-11-08 Thread Ozan Çağlayan
Salı 09 Kasım 2010 günü (saat 01:12:17) Robby Workman şunları yazmıştı:

> 
> On the other hand, if your goal is to have a persistent hostname
> that never changes, then you want something like this:
> 
>   [rwork...@liberty ~]$ cat /etc/NetworkManager/NetworkManager.conf
>   # /etc/NetworkManager/nm-system-settings.conf
>   #
>   # See NetworkManager.conf(5) for more information on this file
> 
>   [main]
>   plugins=keyfile
>   dhcp=dhcpcd
> 
>   [keyfile]
>   hostname=liberty

Yes you are right but this has some drawbacks. What happens when the user 
changes the hostname from /etc/some_distro_dependent_hostname_file?

I think the persistent hostname capabilities of the plugins provides more 
dynamic hostname detection and adjustment.

---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Persistent hostname issues

2010-11-08 Thread Ozan Çağlayan
Hi,

I'm really confused how the hostname things are handled in NM. I'm trying to 
understand looking through the code but I'm completely lost as there are 
methods which wraps methods which wraps methods, etc.

Here's the setup:

* NetworkManager 0.8.1
* DHCP client is dhcpcd 5.2.7
* plugin used: only keyfile
* All hostname related hooks are removed from dhcpcd package

Problem:

There are user reports which complains that the machine hostname changes once 
the machine acquires an IP from DHCP. Same reports tells that removing option 
host_name from /etc/dhcpcd.conf fixes the issue.

Questions:

1) Digging through the code, I can't find any place where dhcpcd.conf is 
parsed! Am I wrong? Can this be a false positive?

2) in src/dhcp-manager/nm-dhcp-manager.c: nm_dhcp_manager_start_ip4() it says: 
"If we're asked to send the hostname to DHCP server..". What's the way of 
asking NM to send the hostname to DHCP server? On my system dhcpcd never gets 
the -h parameter as the hostname is NULL. What does 
nm_setting_ip4_config_get_dhcp_send_hostname() returns?

3) I tried to write a plugin for persistent hostname support. I copied ifcfg-
suse and modified it to support Pardus. I'm searching "option.*host_name" in 
dhcpcd.conf for hostname_is_dynamic() method and I'm reading/writing the 
specific hostname file of Pardus. But what should I expect from this plugin? 

Should it update the hostname file when I call glibc's sethostname()?
Should it update machine's hostname when I modify the hostname file?

Currently it detects the changes in the hostname file but nothing changes in 
the system. I searched for plugin_set_hostname() in the NM code but can't find 
it, wrapped thing are all around :(

Thanks a lot!



---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Making system scope the default one

2010-10-25 Thread Ozan Çağlayan
Pazartesi 25 Ekim 2010 günü (saat 13:15:49) Jirka Klimes şunları yazmıştı:
> On Saturday 23 of October 2010 13:11:48 Ozan Çağlayan wrote:
> 
> diff --git a/src/connection-editor/ce-page.c
> b/src/connection-editor/ce-page.c index bcb90de..0fa1916 100644
> --- a/src/connection-editor/ce-page.c
> +++ b/src/connection-editor/ce-page.c
> @@ -407,7 +407,7 @@ ce_page_new_connection (const char *format,
> GSList *connections;
> 
>   connection = nm_connection_new ();
> - nm_connection_set_scope (connection, NM_CONNECTION_SCOPE_USER);
> + nm_connection_set_scope (connection, NM_CONNECTION_SCOPE_SYSTEM);
> 
>   s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
>   nm_connection_add_setting (connection, NM_SETTING (s_con));
> 

Ah, thanks this seems to fix the issue but a minor glitch stays. When we 
uncheck the system_checkbutton in a new connection window, the buttons stays 
polkit-aware, but actually the connection is added to user scope. I've done 
the following modification in nm-connection-editor.c but can't be sure if it 
is the correct place/way to handle this.


@@ -264,8 +264,7 @@ system_checkbutton_toggled_cb (GtkWidget
 ·   * original connection scope was USER and the "system" checkbutton is
 ·   * unchecked.
 ·   */
-·  if (   !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))
-·  && (editor->orig_scope == NM_CONNECTION_SCOPE_USER))
+·  if (   !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 ·  ·   use_polkit = FALSE;


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Making system scope the default one

2010-10-23 Thread Ozan Çağlayan
Hi,

I want to modify nm-applet to use the system connections by default instead of 
the user-based connections. I don't have any GTK+ experience, tried a little 
bit but no hope.

All I want to do is to invert the default state of the 'Available to all users' 
checkbox to True so that it comes toggled and the buttons are polkit-aware. I 
modified the glade file and added a property active which is 'True', but I have 
to trigger the relevant callback in nm-connection-editor.c so that the UI is 
re-populated. Tried calling the toggled callback by hand or calling 
gtk_button_set_active() but nope. There are (editor->orig_scope == ) checks in 
the code which I think reverts the active state of the checkbox back to False I 
don't know why.

Can someone help me? And will defaulting to system scope break things in NM?

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


Re: Managing a connection using D-Bus API

2010-07-08 Thread Ozan Çağlayan
Perşembe 01 Temmuz 2010 günü (saat 16:46:46) Daenyth Blank şunları yazmıştı:
> Can you post a link to your current code? I should be able to help you
> out or I can add something to the API if there's nothing workable
> right now. It is a little incomplete but should be able to get what
> you want.

Hi,

We have faced some limitations about manual DNS settings. When the dns 
attribute of a connection is set, the given string is passed to a dbus.Array 
within the getter in networkmanager.py. We couldn't find a way to pass a 
secondary DNS to the connection.

Is it ever possible?


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Managing a connection using D-Bus API

2010-07-02 Thread Ozan Çağlayan
Perşembe 01 Temmuz 2010 günü (saat 18:01:04) Giovanni Campagna şunları 
yazmıştı:
> On Thu, Jul 1, 2010 at 2:56 PM, Ozan Çağlayan  wrote:
> > Hi,
> > 
> > I'm writing a Python script which uses python-networkmanager for
> > communicating with NetworkManager's D-Bus facilities.
> > 
> > I want to disconnect an active connection. Using the nm-applet, we are
> > not forced to write a MAC address for a connection.
> > 
> > Say that I want to disconnect the device eth0 AA:BB:CC:DD:EE:FF which is
> > currently connected to the connection with the ID "WiredConnection1".
> > 
> > Since the connection doesn't have an hwaddress set, I can't match the
> 
> > connection with the device. What I want to do is sth like that:
> You need the ActiveConnection object.
> That is, obtain ActiveConnections property from
> /org/freedesktop/NetworkManager. Obtain the Connection object with the ID
> you want
> Find the ActiveConnection whose Connection property is the Connection
> object you found
> For each device in the Devices property, invoke Deactivate.

Oops the problem was during the activation of a given connection not 
deactivation. For deactivation, we're doing exactly what you suggested.

This is the code snippet I'm talking about. It'll give an error when 
mac_address is None.

def set_profile_state_up(nm_handle, profile):
for conn in nm_handle.connections:
if conn.settings.id == profile:
for device in nm_handle.devices:
if device.hwaddress == conn.settings.mac_address:
nm_handle.activate_connection(conn, device)

We've also looked at nm-applet. Apparently it lists all the available 
connections for a specific type under all the specific device so I don't 
expect a solution to be available but you may have some good suggestions.

Thanks.


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Managing a connection using D-Bus API

2010-07-01 Thread Ozan Çağlayan
On 01.07.2010 23:55, Daenyth Blank wrote:
> On Thu, Jul 1, 2010 at 16:26, Ozan Çağlayan  wrote:
>> On 01.07.2010 16:46, Daenyth Blank wrote:
>>> Can you post a link to your current code? I should be able to help you
>>> out or I can add something to the API if there's nothing workable
>>> right now. It is a little incomplete but should be able to get what
>>> you want.
>>
>> http://svn.pardus.org.tr/uludag/trunk/playground/intern/network-client/network
> Cool! At work at the moment, but I'll see if I can look into this
> later tonight. Just as an FYI, I do plan to change things around
> internally because the class structure is pretty junky right now, but
> I will try to keep breaking changes to a minimum and put some stuff
> out for migration if there are any. I don't expect the NetworkManager
> class to change much.

Thanks for your interest :) I already packaged python-networkmanager and it's
available through Pardus repositories. The API is clean, the nm-util.py is a
very nice example. Actually, the first task of the student was to write a
Python API around NM D-Bus interface until I've hit your binding when doing some
preliminary research in Google. That saved us from reinventing the wheel.

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


Re: Managing a connection using D-Bus API

2010-07-01 Thread Ozan Çağlayan
On 01.07.2010 23:40, Giovanni Campagna wrote:

> 
> I believe it could help users of some other distros too. Why not
> developing togheter with other NM frontends (nmcli / nm-applet)?
> In particular with regard to modifying connections, you should follow
> closely, as they plan to change the way settings are stored

That's of course possible but I'll prefer waiting 2-3 weeks for the current code
to become more mature and fully functional. I think that the API modifications
in anywhere should be transparent as it is possible thanks to the binding but
I'll keep this in mind.

> 
> According to NetworkManager docs (
> http://projects.gnome.org/NetworkManager/developers/spec-08.html ),
> you can deactivate a connection using NM.DeactivateConnection() (or
> the binding equivalent), except that nm-applet will detect the
> connection going down and, not knowing why, will immediately
> reconnect.

Hm, the stickyness of nm-applet's behaviour is a little bit weird but I think 
that
arises from the tagline of NM which is "NetworkManager attempts to keep an 
active
network connection available at all times."


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


Re: Managing a connection using D-Bus API

2010-07-01 Thread Ozan Çağlayan
On 01.07.2010 16:46, Daenyth Blank wrote:
> Can you post a link to your current code? I should be able to help you
> out or I can add something to the API if there's nothing workable
> right now. It is a little incomplete but should be able to get what
> you want.

http://svn.pardus.org.tr/uludag/trunk/playground/intern/network-client/network

To answer you and Giovanni about why we're writing this instead of using nmcli, 
nm-util,etc:

We (Pardus Linux[0]) used to use our own networking backend since these days. 
It was a python and D-Bus
based networking backend which worked quite well but ever since the new 
connectivity
technologies like CDMA, HSPA, VPN, etc. become popular, we've figured out that 
we are not able to
maintain and improve it due to lack of time and hardware material.

So with our upcoming releases, we'll migrate to NetworkManager+ModemManager but 
we don't want
to break our own userspace utility's behaviour *network* which is an 
interactive command line tool
helping users to edit/create/delete new ethernet and wi-fi profiles and 
managing them.

That's way one of our internship students now tries to port it to NM using 
python-networkmanager.

BTW, does activate/deactivate closes and re-establishes the connection? I 
didn't have time to
look at it but that's what my student said. So it seems that he's using 
connect() disconnect()
for completely bringing down the interface.

Thanks for your helps
Ozan Caglayan

[0]: http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Managing a connection using D-Bus API

2010-07-01 Thread Ozan Çağlayan
Hi,

I'm writing a Python script which uses python-networkmanager for communicating 
with NetworkManager's D-Bus facilities.

I want to disconnect an active connection. Using the nm-applet, we are not 
forced to write a MAC address for a connection.

Say that I want to disconnect the device eth0 AA:BB:CC:DD:EE:FF which is 
currently connected to the connection with the ID "WiredConnection1".

Since the connection doesn't have an hwaddress set, I can't match the 
connection with the device. What I want to do is sth like that:

python network.py down WiredConnection1

Is it ever possible (without providing connection UUID)?

Thanks,

---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] editor: mark two tooltips as translatable

2010-04-29 Thread Ozan Çağlayan
---
 src/connection-editor/ce-page-wireless.glade |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/connection-editor/ce-page-wireless.glade 
b/src/connection-editor/ce-page-wireless.glade
index 1cd9f3f..14cf313 100644
--- a/src/connection-editor/ce-page-wireless.glade
+++ b/src/connection-editor/ce-page-wireless.glade
@@ -68,7 +68,7 @@
   
 True
 True
-This option locks this connection to the 
network device specified by the MAC address entered here.  Example: 
00:11:22:33:44:55
+This option locks this 
connection to the network device specified by the MAC address entered here.  
Example: 00:11:22:33:44:55
   
   
 1
@@ -201,7 +201,7 @@
   
 True
 True
-This option locks this connection to the 
wireless access point (AP) specified by the BSSID entered here.  Example: 
00:11:22:33:44:55
+This option locks this 
connection to the wireless access point (AP) specified by the BSSID entered 
here.  Example: 00:11:22:33:44:55
   
   
 1
-- 
1.7.0.4

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


Re: The logic behind user/system settings

2010-03-11 Thread Ozan Çağlayan
10 Mart 2010 Çarşamba günü (saat 13:55:35) Marc Herbert şunları yazmıştı:

> 
> There is a checkbox in nm-applet to decide whether a connection is
> system-wide versus not.

Yes that was always inactive and the reason was that there was no active 
plugins enabled. When I wrote keyfile to the relevant .conf file in /etc, that 
became checkable and usable. I can now add system-wide connections through 
polkit authentication, finally :)

Thanks all.

---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


The logic behind user/system settings

2010-03-09 Thread Ozan Çağlayan
Hi,

I'm from the core developer team of a linux distribution called Pardus Linux[0].

Years ago, when there wasn't even Network-Manager, we developed a network 
management backend in C/Python that we're still using
in our distribution but due to lack of time/interest it's getting older and 
older which risks to not fulfill the current
desktop user's needs.

So we're seriously thinking about migrating to Network-Manager as soon as the 
KDE4 manager/plasmoid gets ready as Pardus comes
with KDE by default.

I'm currently experimenting with NM 0.8 and nm-applet. Here are some questions:

* There's this "Auto ifaceX" default/unremovable connection which is Up'ped by 
default when NM is launched. Okay, it's
good to have a default profile which will always try hard to bring the machine 
online. But as far as I understand, the connections
that I'm adding from nm-applet are considered as some sort of user-settings so 
if that specific user which added that connection
profile never loggs in, should I forcely stick with that automatic dhcp 
profile? Isn't there something like system-wide connections
which will take effect when NM is spawned? How can the root user setup a manual 
connection on his server system which doesn't even have a
desktop session?

* Why does nm-applet's tray icon's left-click menu provides a sub-menu to VPN 
connections? It's weird. That context menu seems to have
dynamic content e.g. when I add a connection for eth0, it appears alltogether 
with Auto eth0; if there are no 802.11 devices, there
are no content related to 802.11 connections but that "VPN connections" is 
always there which I think is not at all human-interface
centric and ergonomic.

* What are the plugins (ifcfg-rh for redhat/fedora for example) for?

Thanks,
Ozan Caglayan

[0]: http://www.pardus.org.tr/eng
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Reconnection after manual disconnection still fails

2009-12-16 Thread Ozan Çağlayan
Hi,

I have reconnection problems with an Huawei K3715 similar to the
following bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=541314

I'm not using NetworkManager, I have my own Python backends/scripts to
establish the connection:

- Enable the modem
- Send the PIN
- Call Connect("*99#")
- Got CONNECT from the modem
- Start pppd and set DNS and default gateway
- Done

Now when I want to disconnect,

- Send SIGTERM to pppd,
- Call Disconnect() on modem.

I clearly see the state transition from MM's console output. And it also
says

(/dev/ttyUSB0) closing serial device...

Now if I call Connect() or getSignalQuality() I always got a DBus exception:

SerialSendFailed: Sending command failed: device is not enabled.

I have to unplug and replug the device.
I'm using the latest MM from git.

Thanks,
Ozan
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Questions about ModemManager

2009-10-01 Thread Ozan Çağlayan
Dan Williams wrote:
> On Mon, 2009-09-28 at 10:57 +0300, Tambet Ingo wrote:
>   
>> On Fri, Sep 25, 2009 at 12:50, Ozan Çağlayan  wrote:
>> 
>>> 1. After calling Connect() and using PPPD to create a PPP connection
>>> through a modem, how should I cleanly disconnect from device? I first
>>> terminate PPPD and then call Disconnect() over D-Bus but after that I'm
>>> having serial connection timeouts over MM if I recall Connect() a second
>>> time. What's the purpose of Disconnect()? Should it be used? It doesn't
>>> seem to send some AT commands at all as the --debug output of MM stays
>>> intact after Disconnect() calls.
>>>   
>> Disconnect() can't send any AT commands, the device is in use and
>> doesn't accept any commands. MM instead sets the sport speed to 0 bps,
>> just like other terminal handling programs do. I suspect pppd does the
>> same thing, so it doesn't really matter whether you terminate pppd or
>> call Disconnect(), the result should be exactly the same. It might be
>> a good idea to call Disconnect() too, in case pppd segfaults on
>> shutdown or something.
>> 
>
> MM sets the port speed to 0, but we should probably be trying the +++
> escape procedure too to set the modem into command mode and doing an
> ATH.  I planned to work on that after  merging the enable/disable split.
>   

But after calling Disconnect() I can still use the ppp connection
flawlessly.

What I wanted to ask was actually the correct method of terminating a
connection over an HSPA modem. I'm calling Disconnect() and then I'm
sending SIGTERM to pppd. But then when I try to reconnect, it sometimes
works, sometimes it gives the error below (No cause stuff) and sometimes
serial port timeout errors. So I'm suspicious about the way I'm handling
the connections.

Thanks.


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


Questions about ModemManager

2009-09-25 Thread Ozan Çağlayan
Hi,

I have some problems with MM that I can't figure out how to correctly
handle. I'm using D-Bus for communicating with MM.


1. After calling Connect() and using PPPD to create a PPP connection
through a modem, how should I cleanly disconnect from device? I first
terminate PPPD and then call Disconnect() over D-Bus but after that I'm
having serial connection timeouts over MM if I recall Connect() a second
time. What's the purpose of Disconnect()? Should it be used? It doesn't
seem to send some AT commands at all as the --debug output of MM stays
intact after Disconnect() calls.

2. What does 'No cause information available' means?

** (modem-manager:7311): DEBUG: (ttyUSB0): <-- '+CME ERROR:
11'
** (modem-manager:7311): DEBUG: Got failure code 11: SIM PIN required
** (modem-manager:7311): DEBUG: (ttyUSB0): --> 'AT+CFUN=1'
** (modem-manager:7311): DEBUG: (ttyUSB0): <-- 'OK'
** (modem-manager:7311): DEBUG: (ttyUSB0): --> 'AT+CSQ'
** (modem-manager:7311): DEBUG: (ttyUSB0): <-- '+CME ERROR:
11'
** (modem-manager:7311): DEBUG: Got failure code 11: SIM PIN required
** (modem-manager:7311): DEBUG: (ttyUSB0): --> 'AT+CPIN=""'
** (modem-manager:7311): DEBUG: (ttyUSB0): <-- 'OK'
** (modem-manager:7311): DEBUG: (ttyUSB0): --> 'AT+CSQ'
** (modem-manager:7311): DEBUG: (ttyUSB0): <-- '+CSQ:
13,99OK'
** (modem-manager:7311): DEBUG: (ttyUSB0): --> 'ATDT*99#'
** (modem-manager:7311): DEBUG: (ttyUSB0): <-- 'NO CARRIER'
** (modem-manager:7311): DEBUG: Got failure code 3: No carrier
** (modem-manager:7311): DEBUG: (ttyUSB0): --> 'AT+CEER'
** (modem-manager:7311): DEBUG: (ttyUSB0): <-- '+CEER: No cause
information availableOK'

3. What does Enable() exactly do on the device?


Thanks,

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


Re: [PATCH] backends: Add Pardus Linux support

2009-08-31 Thread Ozan Çağlayan
Ozan Çağlayan wrote:

CC to Dan Williams
> Add Pardus Linux support to NetworkManager
> ---
>  configure.ac|   10 +-
>  src/backends/Makefile.am|4 ++
>  src/backends/NetworkManagerPardus.c |   57 
> +++
>  3 files changed, 69 insertions(+), 2 deletions(-)
>  create mode 100644 src/backends/NetworkManagerPardus.c
>
> diff --git a/configure.ac b/configure.ac
> index 5cfec2e..dbd03ec 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -83,7 +83,7 @@ dnl Make sha1.c happy on big endian systems
>  dnl
>  AC_C_BIGENDIAN
>  
> -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the 
> Linux distribution to target: One of redhat, suse, gentoo, debian, arch, 
> slackware, paldo or mandriva]))
> +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the 
> Linux distribution to target: One of redhat, suse, gentoo, debian, arch, 
> slackware, paldo, mandriva or pardus]))
>  if test "z$with_distro" = "z"; then
>   AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
>   AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
> @@ -94,6 +94,7 @@ if test "z$with_distro" = "z"; then
>   AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
>   AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
>   AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
> + AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
>   if test "z$with_distro" = "z"; then
>   with_distro=`lsb_release -is`
>   fi
> @@ -105,7 +106,7 @@ if test "z$with_distro" = "z"; then
>   exit 1
>  else
>   case $with_distro in
> - 
> redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva) ;;
> + 
> redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus) ;;
>   *)
>   echo "Your distribution (${with_distro}) is not yet 
> supported!  (patches welcome)"
>   exit 1
> @@ -158,6 +159,11 @@ if test x"$with_distro" = xmandriva; then
>AC_DEFINE(TARGET_MANDRIVA, 1, [Define if you have Mandriva])
>  fi
>  
> +AM_CONDITIONAL(TARGET_PARDUS, test x"$with_distro" = xpardus)
> +if test x"$with_distro" = xpardus; then
> +  AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus])
> +fi
> +
>  AC_MSG_CHECKING([Linux Wireless Extensions >= 18])
>  AC_TRY_COMPILE([#ifndef __user
>  #define __user
> diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am
> index 65c96b5..0e037c4 100644
> --- a/src/backends/Makefile.am
> +++ b/src/backends/Makefile.am
> @@ -49,6 +49,10 @@ if TARGET_MANDRIVA
>  libnmbackend_la_SOURCES += NetworkManagerMandriva.c
>  endif
>  
> +if TARGET_PARDUS
> +libnmbackend_la_SOURCES += NetworkManagerPardus.c
> +endif
> +
>  libnmbackend_la_LIBADD += $(DBUS_LIBS) $(GLIB_LIBS)
>  libnmbackend_la_CPPFLAGS = \
>   $(DBUS_CFLAGS) \
> diff --git a/src/backends/NetworkManagerPardus.c 
> b/src/backends/NetworkManagerPardus.c
> new file mode 100644
> index 000..52703e2
> --- /dev/null
> +++ b/src/backends/NetworkManagerPardus.c
> @@ -0,0 +1,57 @@
> +/* NetworkManager -- Network link manager
> + *
> + * Ozan Caglayan 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with this program; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> + *
> + * (C) Copyright 2004 RedHat, Inc.
> + * (C) Copyright 2009 TUBITAK/UEKAE
> + */
> +
> +#ifdef HAVE_CONFIG_H
> +#include 
> +#endif
> +
> +#include 
> +#include 
> +#include 
> +
> +#include "NetworkManagerGeneric.h"
> +#include "NetworkManagerSystem.h"
> +
> +/*
> + * nm_system_enable_loopback
> + *
> + * Bring up the loopback interface
> + *
> + */
> +void nm_system_enable_loopback (void)
> +{
> + nm_generic_enable_loopback ();
> +}
> +
> +
> +/*
> + * nm_system_update_dns
> + *
> + * Make glibc/nscd aware of any changes to the resolv.conf file by
> + * restarting nscd.
> + *
> + */
> +void nm_system_update_dns (void)
> +{
> + /* I'm not running nscd */
> +}
> +
>   

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


Current master is broken

2009-08-24 Thread Ozan Çağlayan
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../marshallers
-I../src/named-manager -I../src/vpn-manager -I../src/dhcp-manager
-I../src/supplicant-manager -I../src/dnsmasq-manager
-I../src/modem-manager -I../src/bluez-manager -I../src/system-settings
-I../libnm-util -I../libnm-glib -I../callouts -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include   -lpthread -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include-I/usr/include/gudev-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
-DG_DISABLE_DEPRECATED -DBINDIR=\"/usr/bin\" -DSBINDIR=\"/usr/sbin\"
-DLIBEXECDIR=\"/usr/libexec\" -DDATADIR=\"/usr/share\"
-DSYSCONFDIR=\"/usr/etc\" -DLOCALSTATEDIR=\"/usr/var\"
-DNM_RUN_DIR=\"/usr/var/run/NetworkManager\"
-DNMLOCALEDIR=\"/usr/share/locale\" -DARP_DEBUG   -Wall -Werror
-std=gnu89 -g -O2 -Wshadow -Wmissing-declarations -Wmissing-prototypes
-Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter
-Wno-sign-compare -fno-strict-aliasing -MT NetworkManager-nm-logging.o
-MD -MP -MF .deps/NetworkManager-nm-logging.Tpo -c -o
NetworkManager-nm-logging.o `test -f 'nm-logging.c' || echo
'./'`nm-logging.c

cc1: warnings being treated as errors
nm-logging.c: In function 'fallback_get_backtrace':
nm-logging.c:57: error: format '%lx' expects type 'long unsigned int',
but argument 6 has type 'int'
nm-logging.c:63: error: format '%lx' expects type 'long unsigned int',
but argument 6 has type 'int'

which is caused by:

commit 09459788cdf5543dcdb296652475ef4afd59ad1e
Author: Dan Williams 
Date:   Fri Aug 21 12:16:17 2009 -0500

core: don't use backtrace_symbols() from a signal handler

It uses malloc(), which you can't do from a signal handler.


Regards,
Ozan
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] backends: Add Pardus Linux support

2009-08-24 Thread Ozan Çağlayan
Add Pardus Linux support to NetworkManager
---
 configure.ac|   10 +-
 src/backends/Makefile.am|4 ++
 src/backends/NetworkManagerPardus.c |   57 +++
 3 files changed, 69 insertions(+), 2 deletions(-)
 create mode 100644 src/backends/NetworkManagerPardus.c

diff --git a/configure.ac b/configure.ac
index 5cfec2e..dbd03ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ dnl Make sha1.c happy on big endian systems
 dnl
 AC_C_BIGENDIAN
 
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux 
distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, 
paldo or mandriva]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux 
distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, 
paldo, mandriva or pardus]))
 if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
@@ -94,6 +94,7 @@ if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
+   AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
if test "z$with_distro" = "z"; then
with_distro=`lsb_release -is`
fi
@@ -105,7 +106,7 @@ if test "z$with_distro" = "z"; then
exit 1
 else
case $with_distro in
-   
redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva) ;;
+   
redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus) ;;
*)
echo "Your distribution (${with_distro}) is not yet 
supported!  (patches welcome)"
exit 1
@@ -158,6 +159,11 @@ if test x"$with_distro" = xmandriva; then
   AC_DEFINE(TARGET_MANDRIVA, 1, [Define if you have Mandriva])
 fi
 
+AM_CONDITIONAL(TARGET_PARDUS, test x"$with_distro" = xpardus)
+if test x"$with_distro" = xpardus; then
+  AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus])
+fi
+
 AC_MSG_CHECKING([Linux Wireless Extensions >= 18])
 AC_TRY_COMPILE([#ifndef __user
 #define __user
diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am
index 65c96b5..0e037c4 100644
--- a/src/backends/Makefile.am
+++ b/src/backends/Makefile.am
@@ -49,6 +49,10 @@ if TARGET_MANDRIVA
 libnmbackend_la_SOURCES += NetworkManagerMandriva.c
 endif
 
+if TARGET_PARDUS
+libnmbackend_la_SOURCES += NetworkManagerPardus.c
+endif
+
 libnmbackend_la_LIBADD += $(DBUS_LIBS) $(GLIB_LIBS)
 libnmbackend_la_CPPFLAGS = \
$(DBUS_CFLAGS) \
diff --git a/src/backends/NetworkManagerPardus.c 
b/src/backends/NetworkManagerPardus.c
new file mode 100644
index 000..52703e2
--- /dev/null
+++ b/src/backends/NetworkManagerPardus.c
@@ -0,0 +1,57 @@
+/* NetworkManager -- Network link manager
+ *
+ * Ozan Caglayan 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2004 RedHat, Inc.
+ * (C) Copyright 2009 TUBITAK/UEKAE
+ */
+
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
+#include 
+#include 
+#include 
+
+#include "NetworkManagerGeneric.h"
+#include "NetworkManagerSystem.h"
+
+/*
+ * nm_system_enable_loopback
+ *
+ * Bring up the loopback interface
+ *
+ */
+void nm_system_enable_loopback (void)
+{
+   nm_generic_enable_loopback ();
+}
+
+
+/*
+ * nm_system_update_dns
+ *
+ * Make glibc/nscd aware of any changes to the resolv.conf file by
+ * restarting nscd.
+ *
+ */
+void nm_system_update_dns (void)
+{
+   /* I'm not running nscd */
+}
+
-- 
1.6.3.4

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