Re: [nm-applet][0.8.4][PATCH] trivial: fix possible uninitialized variable usage

2011-05-09 Thread Paul Menzel
Am Montag, den 09.05.2011, 15:08 -0500 schrieb Dan Williams:
> On Mon, 2011-05-09 at 21:50 +0200, Paul Menzel wrote:
> > Am Montag, den 09.05.2011, 13:17 -0500 schrieb Dan Williams:

[…]

> > > Yeah, that got fixed in commit bbe547f7985498e0bc353ccd2e8e6f9a4a89249b
> > > right after 0.8.4 was released;
> > 
> > Strange.
> > 
> > I cherry picked 
> > 
> > commit cc472cea1021dee90714703380a79e326aa0e681
> > Author: Dan Williams 
> > Date:   Thu Jan 27 10:59:37 2011 -0600
> > 
> > trivial: fix possible uninitialized variable usage
> > 
> > which seems to address the exact same issues. Do you know why I cannot
> > find the commit you referenced in any branch?
> > 
> > $ git branch --contains cc472cea1021dee90714703380a79e326aa0e681
> >   master
> > $ git branch --contains bbe547f7985498e0bc353ccd2e8e6f9a4a89249b
> > $ git --version
> > git version 1.7.5.1
> 
> It's on the NMA_0_8 branch, which is the stable 0.8.x series branch.  Do
> you have that branched locally?  That could be the issue though I don't
> know why;
> 
> http://git.gnome.org/browse/network-manager-applet/commit/?h=NMA_0_8&id=bbe547f7985498e0bc353ccd2e8e6f9a4a89249b

You are right, I did not have a local checkout. `-a` comes to the
rescue.

$ git branch -a --contains
bbe547f7985498e0bc353ccd2e8e6f9a4a89249b
  remotes/origin/NMA_0_8


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] Suppress duplicate SMS notifications

2011-05-09 Thread Nathan Williams
On some modems, such as the Samsung Y3300, unsolicited notifications for SMS
messages (+CMTI) are sent over both the primary and secondary ports.
Currently, this leads to multiple SmsReceived signals being sent. This patch
de-dups the signals by tracking the index numbers that have been seen so
far. The data structure here could also be a basis for coalescing multipart
messages.

- Nathan
---
 src/mm-generic-gsm.c |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c
index 58454da..3340672 100644
--- a/src/mm-generic-gsm.c
+++ b/src/mm-generic-gsm.c
@@ -121,6 +121,9 @@ typedef struct {
 gboolean loc_signal;
 
 MMModemGsmUssdState ussd_state;
+
+/* SMS */
+GHashTable *sms_present;
 } MMGenericGsmPrivate;
 
 static void get_registration_status (MMAtSerialPort *port, MMCallbackInfo *info);
@@ -1312,6 +1315,7 @@ cmti_received (MMAtSerialPort *port,
gpointer user_data)
 {
 MMGenericGsm *self = MM_GENERIC_GSM (user_data);
+MMGenericGsmPrivate *priv = MM_GENERIC_GSM_GET_PRIVATE (self);
 
 guint idx=0;
 char *mem;
@@ -1324,6 +1328,13 @@ cmti_received (MMAtSerialPort *port,
 idx = atoi (str);
 g_free (str);
 
+/* Don't signal multiple times if there are multiple CMTI notifications for a message */
+if (g_hash_table_lookup_extended (priv->sms_present, (void *)idx, NULL, NULL))
+return;
+
+/* Nothing is currently stored in the hash table - presence is all that matters. */
+g_hash_table_insert (priv->sms_present, (void *)idx, NULL);
+
 /* todo: parse pdu to know if the sms is complete */
 mm_modem_gsm_sms_received (MM_MODEM_GSM_SMS (self),
idx,
@@ -4227,8 +4238,10 @@ sms_delete (MMModemGsmSms *modem,
 MMCallbackInfo *info;
 char *command;
 MMAtSerialPort *port;
+MMGenericGsmPrivate *priv = MM_GENERIC_GSM_GET_PRIVATE (MM_GENERIC_GSM (modem));
 
 info = mm_callback_info_new (MM_MODEM (modem), callback, user_data);
+g_hash_table_remove (priv->sms_present, (void *)idx);
 
 port = mm_generic_gsm_get_best_at_port (MM_GENERIC_GSM (modem), &info->error);
 if (!port) {
@@ -5237,6 +5250,7 @@ mm_generic_gsm_init (MMGenericGsm *self)
 priv->act = MM_MODEM_GSM_ACCESS_TECH_UNKNOWN;
 priv->reg_regex = mm_gsm_creg_regex_get (TRUE);
 priv->roam_allowed = TRUE;
+priv->sms_present = g_hash_table_new (g_direct_hash, g_direct_equal);
 
 mm_properties_changed_signal_register_property (G_OBJECT (self),
 MM_MODEM_GSM_NETWORK_ALLOWED_MODE,
@@ -5454,6 +5468,7 @@ finalize (GObject *object)
 g_free (priv->oper_code);
 g_free (priv->oper_name);
 g_free (priv->simid);
+g_hash_table_destroy (priv->sms_present);
 
 G_OBJECT_CLASS (mm_generic_gsm_parent_class)->finalize (object);
 }
-- 
1.7.3.1

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


Re: uClibc: nm-utils.h:30:22: fatal error: execinfo.h: No such file or directory

2011-05-09 Thread Paul Menzel
Am Montag, den 09.05.2011, 13:35 -0500 schrieb Dan Williams:
> On Sat, 2011-05-07 at 23:35 +0200, Paul Menzel wrote:

> > trying to use uClibc to build NetworkManager in OpenEmbedded [1]
> > (distribution: `minimal-uclibc` for `MACHINE = "beagleboard"`) fails
> > with the following error.
> > 
> > According to this comment in GNOME BTS ticket 146693 [2] (regarding
> > aMule) it should be checked for the existence of `execinfo.h` in the
> > build system and if it is not available the backtrace calls should be
> > made a no op.
> > 
> > Unfortunately I can not point you to a project already having the
> > appropriate checks implemented, but there should be some.
> > 
> > Being able to compile NetworkManager using uClibc should make
> > NetworkManager attractive for some more embedded use cases.
> 
> I have no idea why that's there for master (probably left over from the
> old nm_warn/nm_error/etc calls) so I've removed it there.

Great. That was easy [1].

> I guess all we can do for 0.8.4 (since this is a public header, and we
> can't really #include  there since we don't distribute it) is
> try to use uclibc-specific defines to make the nm_print_backtrace() call
> be a noop if we're on uclibc?

That sounds reasonable. You can use something like the following

#if !defined(__UCLIBC__)
# include 
#endif

or whatever is needed.

Thanks,

Paul


[1] 
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=4ae83f2d93fa67f86f8437d4b0fec8bd2b63ee2d


signature.asc
Description: This is a digitally signed message part
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [nm-applet][0.8.4][PATCH] trivial: fix possible uninitialized variable usage

2011-05-09 Thread Dan Williams
On Mon, 2011-05-09 at 21:50 +0200, Paul Menzel wrote:
> Am Montag, den 09.05.2011, 13:17 -0500 schrieb Dan Williams:
> > On Mon, 2011-05-09 at 13:15 +0200, Paul Menzel wrote:
> > > Date: Thu, 27 Jan 2011 10:59:37 -0600
> > > 
> > >   […]
> > >   arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 
> > > -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb 
> > > --sysroot=/oe/build-angstrom-next/angstrom-dev/s
> > >   ysroots/armv7a-angstrom-linux-gnueabi -DHAVE_CONFIG_H -I. -I..  
> > > -pthread -DORBIT2=1 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/incl
> > >   ude/dbus-1.0 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/dbus-1.0/include
> > >  -I/oe/build-angstrom-next/angstrom-dev/sysro
> > >   ots/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/glib-2.0/include
> > >  -I/home/paul
> > >   
> > > /oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/NetworkManager
> > >  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-lin
> > >   ux-gnueabi/usr/include/libnm-glib 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gtk-2.0
> > >  -I/oe/build-angstrom-next/an
> > >   
> > > gstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/gtk-2.0/include 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/atk-1.
> > >   0 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/cairo
> > >  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstro
> > >   m-linux-gnueabi/usr/include/pango-1.0 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/pixman-1
> > >  -I/oe/build-angstrom-ne
> > >   
> > > xt/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/freetype2
> > >  
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/lib
> > >   png12 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gconf/2
> > >  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-a
> > >   ngstrom-linux-gnueabi/usr/include/orbit-2.0 
> > > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gnome-keyring-1
> > > -DICONDIR=\""/usr
> > >   /share/icons"\" -DUIDIR=\""/usr/share/nm-applet"\" 
> > > -DBINDIR=\""/usr/bin"\" -DSYSCONFDIR=\""/etc"\" 
> > > -DLIBEXECDIR=\""/usr/libexec"\" -DAUTOSTARTDIR=\""/etc/xdg/autostart"\" 
> > > -DVPN_NAM
> > >   E_FILES_DIR=\""/etc/NetworkManager/VPN"\" 
> > > -DNMALOCALEDIR=\"/usr/share/locale\"  -DG_DISABLE_DEPRECATED 
> > > -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_DEPRECATED 
> > > -DATK_DISABLE_SINGLE_INC
> > >   LUDES -DPANGO_DISABLE_DEPRECATED -DPANGO_DISABLE_SINGLE_INCLUDES 
> > > -DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES 
> > > -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_
> > >   INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES 
> > > -DGCONF_DISABLE_DEPRECATED -DGCONF_DISABLE_SINGLE_INCLUDES 
> > > -DBONOBO_DISABLE_DEPRECATED -DBONOBO_DISABLE_SINGLE_INCLU
> > >   DES -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_SINGLE_INCLUDES 
> > > -DGNOME_DISABLE_DEPRECATED -DGNOME_DISABLE_SINGLE_INCLUDES 
> > > -DLIBGLADE_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_S
> > >   INGLE_INCLUDES -DVTE_DISABLE_DEPRECATED -DVTE_DISABLE_SINGLE_INCLUDES 
> > > -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_SINGLE_INCLUDES 
> > > -DWNCK_DISABLE_DEPRECATED -DWNCK_DISABLE_SI
> > >   NGLE_INCLUDES -DLIBSOUP_DISABLE_DEPRECATED 
> > > -DLIBSOUP_DISABLE_SINGLE_INCLUDES -I../src/marshallers -I../src/utils 
> > > -I../src/gconf-helpers -I../src/wireless-security   -Wall -Werror -
> > >   std=gnu89 -fexpensive-optimizations -fomit-frame-pointer 
> > > -frename-registers -O2 -ggdb2 -Wshadow -Wmissing-declarations 
> > > -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-eq
> > >   ual -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -MT 
> > > nm_applet-applet-dialogs.o -MD -MP -MF .deps/nm_applet-applet-dialogs.Tpo 
> > > -c -o nm_applet-applet-dialogs.o `tes
> > >   t -f 'applet-dialogs.c' || echo './'`applet-dialogs.c
> > >   […]
> > >   cc1: warnings being treated as errors
> > >   applet-dialogs.c: In function 'applet_info_dialog_show':
> > >   applet-dialogs.c:331:22: error: 'method' may be used uninitialized in 
> > > this function
> > >   make[3]: *** [nm_applet-applet-dialogs.o] Error 1
> > > ---
> > > Unfortunately this patch is only in master and was not applied to 0.8.4
> > > so that the build fails with the above error message [1]. Therefore in
> > > OpenEmbedded we need to pass `--enable-more-warings=no` to `configure`.
> > > 
> > > This is a cherry-pick from master to a branch bas

Re: [nm-applet][0.8.4][PATCH] trivial: fix possible uninitialized variable usage

2011-05-09 Thread Paul Menzel
Am Montag, den 09.05.2011, 13:17 -0500 schrieb Dan Williams:
> On Mon, 2011-05-09 at 13:15 +0200, Paul Menzel wrote:
> > Date: Thu, 27 Jan 2011 10:59:37 -0600
> > 
> > […]
> > arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 
> > -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb 
> > --sysroot=/oe/build-angstrom-next/angstrom-dev/s
> > ysroots/armv7a-angstrom-linux-gnueabi -DHAVE_CONFIG_H -I. -I..  
> > -pthread -DORBIT2=1 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/incl
> > ude/dbus-1.0 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/dbus-1.0/include
> >  -I/oe/build-angstrom-next/angstrom-dev/sysro
> > ots/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/glib-2.0/include
> >  -I/home/paul
> > 
> > /oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/NetworkManager
> >  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-lin
> > ux-gnueabi/usr/include/libnm-glib 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gtk-2.0
> >  -I/oe/build-angstrom-next/an
> > 
> > gstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/gtk-2.0/include 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/atk-1.
> > 0 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/cairo
> >  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstro
> > m-linux-gnueabi/usr/include/pango-1.0 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/pixman-1
> >  -I/oe/build-angstrom-ne
> > 
> > xt/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/freetype2
> >  
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/lib
> > png12 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gconf/2
> >  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-a
> > ngstrom-linux-gnueabi/usr/include/orbit-2.0 
> > -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gnome-keyring-1
> > -DICONDIR=\""/usr
> > /share/icons"\" -DUIDIR=\""/usr/share/nm-applet"\" 
> > -DBINDIR=\""/usr/bin"\" -DSYSCONFDIR=\""/etc"\" 
> > -DLIBEXECDIR=\""/usr/libexec"\" -DAUTOSTARTDIR=\""/etc/xdg/autostart"\" 
> > -DVPN_NAM
> > E_FILES_DIR=\""/etc/NetworkManager/VPN"\" 
> > -DNMALOCALEDIR=\"/usr/share/locale\"  -DG_DISABLE_DEPRECATED 
> > -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_DEPRECATED 
> > -DATK_DISABLE_SINGLE_INC
> > LUDES -DPANGO_DISABLE_DEPRECATED -DPANGO_DISABLE_SINGLE_INCLUDES 
> > -DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES 
> > -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_
> > INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES 
> > -DGCONF_DISABLE_DEPRECATED -DGCONF_DISABLE_SINGLE_INCLUDES 
> > -DBONOBO_DISABLE_DEPRECATED -DBONOBO_DISABLE_SINGLE_INCLU
> > DES -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_SINGLE_INCLUDES 
> > -DGNOME_DISABLE_DEPRECATED -DGNOME_DISABLE_SINGLE_INCLUDES 
> > -DLIBGLADE_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_S
> > INGLE_INCLUDES -DVTE_DISABLE_DEPRECATED -DVTE_DISABLE_SINGLE_INCLUDES 
> > -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_SINGLE_INCLUDES 
> > -DWNCK_DISABLE_DEPRECATED -DWNCK_DISABLE_SI
> > NGLE_INCLUDES -DLIBSOUP_DISABLE_DEPRECATED 
> > -DLIBSOUP_DISABLE_SINGLE_INCLUDES -I../src/marshallers -I../src/utils 
> > -I../src/gconf-helpers -I../src/wireless-security   -Wall -Werror -
> > std=gnu89 -fexpensive-optimizations -fomit-frame-pointer 
> > -frename-registers -O2 -ggdb2 -Wshadow -Wmissing-declarations 
> > -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-eq
> > ual -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -MT 
> > nm_applet-applet-dialogs.o -MD -MP -MF .deps/nm_applet-applet-dialogs.Tpo 
> > -c -o nm_applet-applet-dialogs.o `tes
> > t -f 'applet-dialogs.c' || echo './'`applet-dialogs.c
> > […]
> > cc1: warnings being treated as errors
> > applet-dialogs.c: In function 'applet_info_dialog_show':
> > applet-dialogs.c:331:22: error: 'method' may be used uninitialized in 
> > this function
> > make[3]: *** [nm_applet-applet-dialogs.o] Error 1
> > ---
> > Unfortunately this patch is only in master and was not applied to 0.8.4
> > so that the build fails with the above error message [1]. Therefore in
> > OpenEmbedded we need to pass `--enable-more-warings=no` to `configure`.
> > 
> > This is a cherry-pick from master to a branch based on the tag 0.8.4.
> 
> Yeah, that got fixed in commit bbe547f7985498e0bc353ccd2e8e6f9a4a89249b
> right after 0.8.4 was released;

Strange.

I cherry picked 

 

Re: [PATCH 3/3] Add libnm-glib and nmcli code

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 14:23 +0300, Pantelis Koukousoulas wrote:
> For the finale, this is the libnm-glib and nmcli part of the support,
> with this you can now make a full pppoatm connection from NetworkManager
> by configuring it in system scope in a keyfile.
> 
> As an example, here is mine:
> (password and username snipped for obvious reasons)
> 
> [connection]
> id=MYISP
> uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc1e
> type=adsl
> timestamp=1304621332
> 
> [adsl]
> username=u...@myisp.com
> password=mypassword
> vpi=8
> vci=35
> encapsulation=vcmux
> protocol=pppoa
> 
> [ipv6]
> method=ignore
> 
> [ipv4]
> method=auto
> 
> Extract from logs:
> NetworkManager[29155]:  Activation (ueagle-atm0) starting connection 
> 'MYISP'
> NetworkManager[29155]:  (ueagle-atm0): device state change: 
> disconnected -> prepare (reason 'none') [30 40 0]
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 1 of 5 (Device 
> Prepare) scheduled...
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 1 of 5 (Device 
> Prepare) started...
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 2 of 5 (Device 
> Configure) scheduled...
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 1 of 5 (Device 
> Prepare) complete.
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 2 of 5 (Device 
> Configure) starting...
> NetworkManager[29155]:  (ueagle-atm0): device state change: prepare -> 
> config (reason 'none') [40 50 0]
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 2 of 5 (Device 
> Configure) successful.
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 3 of 5 (IP 
> Configure Start) scheduled.
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 2 of 5 (Device 
> Configure) complete.
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 3 of 5 (IP 
> Configure Start) started...
> NetworkManager[29155]:  (ueagle-atm0): device state change: config -> 
> ip-config (reason 'none') [50 70 0]
> NetworkManager[29155]:  starting PPP connection
> NetworkManager[29155]:  [1304671146.590156] [nm-ppp-manager.c:1047] 
> nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock 
> nodefaultroute user u...@myisp.com plugin pppoatm.so 8.35 noipdefault noauth 
> usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam 
> /org/freedesktop/NetworkManager/PPP/0 plugin 
> /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
> NetworkManager[29155]:  pppd started with pid 29175
> NetworkManager[29155]:  [1304671146.591235] 
> [NetworkManagerUtils.c:816] nm_utils_get_proc_sys_net_value(): (ueagle-atm0): 
> error reading /proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to 
> open file '/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or 
> directory
> NetworkManager[29155]:  Activation (ueagle-atm0) Stage 3 of 5 (IP 
> Configure Start) complete.
> Plugin pppoatm.so loaded.
> Plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so loaded.
> ** Message: nm-ppp-plugin: (plugin_init): initializing
> ** Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial 
> connection'
> NetworkManager[29155]:  [1304671146.612937] [nm-udev-manager.c:621] 
> handle_uevent(): UDEV event: action 'add' subsys 'net' device 'ppp0'
> NetworkManager[29155]:  [1304671146.613134] [nm-udev-manager.c:525] 
> net_add(): ignoring interface with type 512
> NetworkManager[29155]:  [1304671146.617308] [nm-netlink-monitor.c:117] 
> link_msg_handler(): netlink link message: iface idx 35 flags 0x1090
> Using interface ppp0
> Connect: ppp0 <--> 8.35
> ** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
> ** Message: nm-ppp-plugin: (nm_phasechange): status 6 / phase 'authenticate'
> ** Message: nm-ppp-plugin: (get_credentials): passwd-hook, requesting 
> credentials...
> NetworkManager[29155]:  [1304671149.639511] [nm-agent-manager.c:1044] 
> nm_agent_manager_get_secrets(): Secrets requested for connection 
> /org/freedesktop/NetworkManager/Settings/0 (adsl)
> NetworkManager[29155]:  [1304671149.639684] 
> [nm-settings-connection.c:717] nm_settings_connection_get_secrets(): 
> (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets requested flags 0x1 
> hint 'password'
> NetworkManager[29155]:  [1304671149.640950] [nm-agent-manager.c:959] 
> get_start(): (0x9b4ad10/adsl) system settings secrets sufficient
> NetworkManager[29155]:  [1304671149.641332] 
> [nm-settings-connection.c:573] agent_secrets_done_cb(): 
> (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) existing secrets returned
> NetworkManager[29155]:  [1304671149.641541] 
> [nm-settings-connection.c:579] agent_secrets_done_cb(): 
> (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets request completed
> NetworkManager[29155]:  [1304671149.643074] 
> [nm-settings-connection.c:618] agent_secrets_done_cb(): 
> (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) new agent secrets processed
> ** Message: nm-ppp-plugin: (get_credentials): got credentials from 
> NetworkManager
> PAP authentication succeeded
> ** Message: nm-ppp-plugin: (nm_phasechange

Re: ANN: Release of NetworkManager 0.8.996 (0.9.0-beta2)

2011-05-09 Thread Dan Williams
On Mon, 2011-05-09 at 19:51 +0100, Peter Robinson wrote:
> On Mon, May 9, 2011 at 7:13 PM, Dan Williams  wrote:
> > On Sun, 2011-05-08 at 22:07 +0100, Peter Robinson wrote:
> >> Hi Dan,
> >>
> >> >> Sorry for the delayed response
> >> >>
> >> >> Sugar is the other one that comes to mind. It seems to partially work
> >> >> if you have a system connection like either a wired ethernet or
> >> >> connect to a connection using gnome3 and then login to the sugar
> >> >> interface it partially works. I think the issues are two bits. Firstly
> >> >> the ability to detect a connection and that its online, secondly
> >> >> moving the user settings code over to systems code. Any assistance or
> >> >> patches would be welcome (I'm only new to python), sample code in
> >> >> python would be useful too (I've only managed to find the anaconda
> >> >> patch and it's not much use for the use case).
> >> >
> >> > Yeah, Sugar would need a patch.  The first part (porting to NM 0.9 for
> >> > status information) is pretty easy, the second part where Sugar acts as
> >> > an applet is harder, but actually might be fairly simple with NM 0.9.
> >> > It's been in the back of my mind for a while, but I haven't gotten
> >> > around to doing a proof-of-concept even though I wrote a lot of the
> >> > original code for it 5 years ago :)
> >>
> >> I've done the first hack up of a patch (attached) for NM 0.9. Not sure
> >> if it works as I've not got a wifi based F-15 with me at the moment.
> >> I'll test it more when I get home from RH summit in the next couple of
> >> days. In the mean time is it possible for you to provide some feedback
> >> and advise.
> >>
> >> I'm mostly trying to focus on connection status and wired/wireless
> >> ethernet initially although I've changed some of the GSM based stuff.
> >> I'm not sure if I've got the GSM/Serial -> Modem changes correct.
> >>
> >> Also I'm not sure if I've got the NM_ACTIVE_CONNECTION_STATE* bits
> >> correct as the .h file upstream only has a 0 error code where the
> >> Sugar stuff had numbers for each state.
> >>
> >>  I've looked at a number of patches but I'm not sure if I've got it
> >> all right and I might have confused bits of the compat API too. :-/
> >
> > Sorry I hadn't gotten around to looking at the Sugar bits yet, but I'll
> > happily review what you've got so far.
> 
> I've done minor testing in a VM and it had issues with the move from
> UserSettings to the new system settings. Would love some help with
> that and it would be awesome if we could get something that would work
> for basic wifi into f15.

nm-applet accomplishes that move by checking GConf if it's applet
"stamp" is a certain value (indicating that import has already been
performed) and if not, grabs each connection from GConf and calls NM's
AddConnection() dbus method for each setting.  This happens the first
time the new applet runs and is transparent for the user; after that the
connections are system-owned connections.  The applet also does some
fixup on the "secret flags" for the secrets in each connection, because
those are in the applet's keyring and we keep them in the user's
session.  This basically means iterating through each secret in the
connection and setting the "agent-owned" flag in the setting dict for
each secret, before calling AddConnection(). Then NM will call the
registered secret agent and request secrets for that connection, which
Sugar would pass back just like the old "GetSecrets" call used to work,
really.

Dan


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


Re: [PATCH 2/3] Carrier Handling and PPP support

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 14:23 +0300, Pantelis Koukousoulas wrote:
> This is the "juice" of the patch series. Initial cut at carrier handling
> (by polling /sys/class/atm/$iface/carrier) and also support for calling
> pppd with the proper command-line to achieve a connection.
> 
> Also implement the necessary boilerplate for the NM state machine to
> be happy with our device.
> 
> With this patch, you can already test carrier management but not yet
> make a complete connection.
> 
> Relevant extract from logs:
>  (ueagle-atm0): carrier now ON (device state 20)
>  (ueagle-atm0): device state change: unavailable -> disconnected 
> (reason 'carrier-chagned') [20 30 40]

This looks good, aside from a few style changes but I can fix those up
at commit time if you don't first.   I noticed in a few places that you
used:

x = function(asdfadsf);

where the NM style is to put a space before the ( ie:

x = function (asdfasdf);

THanks!
Dan

> Signed-off-by: Pantelis Koukousoulas 
> ---
>  include/NetworkManager.h |1 +
>  src/nm-device-adsl.c |  519 
> +-
>  src/nm-device-adsl.h |5 +-
>  src/ppp-manager/nm-ppp-manager.c |   31 +++-
>  src/settings/nm-settings.c   |2 +
>  5 files changed, 553 insertions(+), 5 deletions(-)
> 
> diff --git a/include/NetworkManager.h b/include/NetworkManager.h
> index b007e1c..cfc61ee 100644
> --- a/include/NetworkManager.h
> +++ b/include/NetworkManager.h
> @@ -34,6 +34,7 @@
>  #define  NM_DBUS_INTERFACE   
> "org.freedesktop.NetworkManager"
>  #define  NM_DBUS_INTERFACE_DEVICENM_DBUS_INTERFACE ".Device"
>  #define NM_DBUS_INTERFACE_DEVICE_WIRED  NM_DBUS_INTERFACE_DEVICE ".Wired"
> +#define NM_DBUS_INTERFACE_DEVICE_ADSL   NM_DBUS_INTERFACE_DEVICE ".Adsl"
>  #define NM_DBUS_INTERFACE_DEVICE_WIRELESS   NM_DBUS_INTERFACE_DEVICE 
> ".Wireless"
>  #define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH  NM_DBUS_INTERFACE_DEVICE 
> ".Bluetooth"
>  #define NM_DBUS_PATH_ACCESS_POINT   NM_DBUS_PATH "/AccessPoint"
> diff --git a/src/nm-device-adsl.c b/src/nm-device-adsl.c
> index 212fec1..77e4d0a 100644
> --- a/src/nm-device-adsl.c
> +++ b/src/nm-device-adsl.c
> @@ -1,5 +1,6 @@
>  /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
> -/* NetworkManager -- Network link manager
> +/*
> + * Pantelis Koukousoulas 
>   *
>   * 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
> @@ -15,26 +16,153 @@
>   * with this program; if not, write to the Free Software Foundation, Inc.,
>   * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>   *
> - * Pantelis Koukousoulas 
>   */
>  
>  #include 
> +#include 
> +#include 
> +#include 
>  
>  #include "nm-glib-compat.h"
>  #include "nm-device-adsl.h"
>  #include "nm-device-interface.h"
> +#include "nm-device-private.h"
>  #include "nm-properties-changed-signal.h"
> +#include "nm-glib-compat.h"
> +#include "NetworkManagerUtils.h"
> +#include "nm-logging.h"
> +
> +#include "ppp-manager/nm-ppp-manager.h"
> +#include "nm-setting-adsl.h"
>  
>  #include "nm-device-adsl-glue.h"
>  
>  G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE)
>  
> +#define NM_DEVICE_ADSL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), 
> NM_TYPE_DEVICE_ADSL, NMDeviceAdslPrivate))
> +
> +typedef enum
> +{
> + NM_ADSL_ERROR_CONNECTION_NOT_ADSL = 0,
> + NM_ADSL_ERROR_CONNECTION_INVALID,
> + NM_ADSL_ERROR_CONNECTION_INCOMPATIBLE,
> +} NMAdslError;
> +
> +#define NM_ADSL_ERROR (nm_adsl_error_quark ())
> +#define NM_TYPE_ADSL_ERROR (nm_adsl_error_get_type ())
> +
> +static GQuark
> +nm_adsl_error_quark (void)
> +{
> + static GQuark quark = 0;
> + if (!quark)
> + quark = g_quark_from_static_string ("nm-ethernet-error");
> + return quark;
> +}
> +
> +typedef struct {
> + gbooleandisposed;
> + gbooleancarrier;
> + guint   carrier_poll_id;
> +
> + /* PPP */
> + NMPPPManager *ppp_manager;
> + NMIP4Config  *pending_ip4_config;
> +} NMDeviceAdslPrivate;
> +
>  enum {
>   PROPERTIES_CHANGED,
>   LAST_SIGNAL
>  };
> +
>  static guint signals[LAST_SIGNAL] = { 0 };
>  
> +enum {
> + PROP_0,
> + PROP_CARRIER,
> +
> + LAST_PROP
> +};
> +
> +/* FIXME: Move it to nm-device.c and then get rid of all 
> foo_device_get_setting() all around.
> +   It's here now to keep the patch short. */
> +static NMSetting *
> +device_get_setting (NMDevice *device, GType setting_type)
> +{
> + NMActRequest *req;
> + NMSetting *setting = NULL;
> +
> + req = nm_device_get_act_request (device);
> + if (req) {
> + NMConnection *connection;
> +
> + connection = nm_act_request_get_connection (req);
> + if (connection)
> + setting = nm_connection_get_setting (connection, 
> setting_type);
> + 

Re: [PATCH 1/3] Settings and initial "scaffolding"

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 14:23 +0300, Pantelis Koukousoulas wrote:
> This patch adds the settings code (NMSettingAdsl) and the initial
> "scaffolding" i.e., a tiny stub version of NMDeviceAdsl and the
> udev handler code to get the device detected.
> 
> With this patch you should be able to see an atm device being detected
> by networkmanager in the logs, although of course it doesn't
> do anything useful yet.
> 
> Extract from the logs:
> 
>  [1304668252.341354] [nm-udev-manager.c:562] adsl_add(): adsl_add: ATM Device 
> detected from udev. Adding ..
> (ueagle-atm0): failed to look up interface index
> (ueagle-atm0): new ADSL device (driver: 'ueagle-atm' ifindex: -1)
> (ueagle-atm0): exported as /org/freedesktop/NetworkManager/Devices/2
> (ueagle-atm0): now managed
> (ueagle-atm0): device state change: unmanaged -> unavailable (reason 
> 'managed') [10 20 2]
> (ueagle-atm0): deactivating device (reason: 2).
>  [1304668252.345102] [nm-system.c:1349] flush_routes(): (ueagle-atm0) failed 
> to lookup interface index
>  [1304668252.347821] [nm-device.c:3912] nm_device_state_changed(): 
> (ueagle-atm0): device is available,
> 
> Note:
> nm-device.c:nm_device_get_priority()
>   essentially returns the index of the Device Type in the NMDeviceType enum.
>   So, since ADSL typically should have the best priority, it was placed above
>   the ethernet device.

One more thing I forgot about:  make sure to add the setting to
register_default_settings() in nm-connection.c too, and pass TRUE as the
last parameter since this setting is a "base type" which describes
hardware that can be used to connect to a network, as opposed to IPv4
for example which doesn't.

And I see what you were trying to do with the nm_device_get_priority(),
but we'll need to hack that function up since we can't change the device
numbers at all since they are exposed API.

Dan


> Signed-off-by: Pantelis Koukousoulas 
> ---
>  include/NetworkManager.h |   18 +-
>  introspection/Makefile.am|1 +
>  introspection/nm-device-adsl.xml |   15 ++
>  libnm-util/Makefile.am   |2 +
>  libnm-util/libnm-util.ver|   12 +-
>  libnm-util/nm-setting-adsl.c |  476 
> ++
>  libnm-util/nm-setting-adsl.h |   97 
>  src/Makefile.am  |6 +
>  src/nm-device-adsl.c |   83 +++
>  src/nm-device-adsl.h |   57 +
>  src/nm-udev-manager.c|   48 -
>  11 files changed, 804 insertions(+), 11 deletions(-)
>  create mode 100644 introspection/nm-device-adsl.xml
>  create mode 100644 libnm-util/nm-setting-adsl.c
>  create mode 100644 libnm-util/nm-setting-adsl.h
>  create mode 100644 src/nm-device-adsl.c
>  create mode 100644 src/nm-device-adsl.h
> 
> diff --git a/include/NetworkManager.h b/include/NetworkManager.h
> index 17c3a11..b007e1c 100644
> --- a/include/NetworkManager.h
> +++ b/include/NetworkManager.h
> @@ -92,6 +92,7 @@ typedef enum {
>  /**
>   * NMDeviceType:
>   * @NM_DEVICE_TYPE_UNKNOWN: unknown device
> + * @NM_DEVICE_TYPE_ADSL: ADSL WAN device
>   * @NM_DEVICE_TYPE_ETHERNET: a wired ethernet device
>   * @NM_DEVICE_TYPE_WIFI: an 802.11 WiFi device
>   * @NM_DEVICE_TYPE_UNUSED1: not used
> @@ -106,14 +107,15 @@ typedef enum {
>   */
>  typedef enum {
>   NM_DEVICE_TYPE_UNKNOWN   = 0,
> - NM_DEVICE_TYPE_ETHERNET  = 1,
> - NM_DEVICE_TYPE_WIFI  = 2,
> - NM_DEVICE_TYPE_UNUSED1   = 3,
> - NM_DEVICE_TYPE_UNUSED2   = 4,
> - NM_DEVICE_TYPE_BT= 5,  /* Bluetooth */
> - NM_DEVICE_TYPE_OLPC_MESH = 6,
> - NM_DEVICE_TYPE_WIMAX = 7,
> - NM_DEVICE_TYPE_MODEM = 8,
> + NM_DEVICE_TYPE_ADSL  = 1,
> + NM_DEVICE_TYPE_ETHERNET  = 2,
> + NM_DEVICE_TYPE_WIFI  = 3,
> + NM_DEVICE_TYPE_UNUSED1   = 4,
> + NM_DEVICE_TYPE_UNUSED2   = 5,
> + NM_DEVICE_TYPE_BT= 6,  /* Bluetooth */
> + NM_DEVICE_TYPE_OLPC_MESH = 7,
> + NM_DEVICE_TYPE_WIMAX = 8,
> + NM_DEVICE_TYPE_MODEM = 9,
>  } NMDeviceType;
>  
>  /* General device capability flags */
> diff --git a/introspection/Makefile.am b/introspection/Makefile.am
> index 320245e..4950e7d 100644
> --- a/introspection/Makefile.am
> +++ b/introspection/Makefile.am
> @@ -8,6 +8,7 @@ EXTRA_DIST = \
>   nm-device-wifi.xml \
>   nm-device-olpc-mesh.xml \
>   nm-device-ethernet.xml \
> + nm-device-adsl.xml \
>   nm-device-modem.xml \
>   nm-device-wimax.xml \
>   nm-device.xml \
> diff --git a/introspection/nm-device-adsl.xml 
> b/introspection/nm-device-adsl.xml
> new file mode 100644
> index 000..9610f98
> --- /dev/null
> +++ b/introspection/nm-device-adsl.xml
> @@ -0,0 +1,15 @@
> +
> +
> + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0";>
> +  
> +
> +
> +
> +
> +A dictionary mapping property names to variant boxed values
> +
> +
> +
> +
> +  
> +
> diff --git a/libnm-util/Makefile

Re: [PATCH 1/3] Settings and initial "scaffolding"

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 14:23 +0300, Pantelis Koukousoulas wrote:
> This patch adds the settings code (NMSettingAdsl) and the initial
> "scaffolding" i.e., a tiny stub version of NMDeviceAdsl and the
> udev handler code to get the device detected.
> 
> With this patch you should be able to see an atm device being detected
> by networkmanager in the logs, although of course it doesn't
> do anything useful yet.
> 
> Extract from the logs:
> 
>  [1304668252.341354] [nm-udev-manager.c:562] adsl_add(): adsl_add: ATM Device 
> detected from udev. Adding ..
> (ueagle-atm0): failed to look up interface index
> (ueagle-atm0): new ADSL device (driver: 'ueagle-atm' ifindex: -1)
> (ueagle-atm0): exported as /org/freedesktop/NetworkManager/Devices/2
> (ueagle-atm0): now managed
> (ueagle-atm0): device state change: unmanaged -> unavailable (reason 
> 'managed') [10 20 2]
> (ueagle-atm0): deactivating device (reason: 2).
>  [1304668252.345102] [nm-system.c:1349] flush_routes(): (ueagle-atm0) failed 
> to lookup interface index
>  [1304668252.347821] [nm-device.c:3912] nm_device_state_changed(): 
> (ueagle-atm0): device is available,
> 
> Note:
> nm-device.c:nm_device_get_priority()
>   essentially returns the index of the Device Type in the NMDeviceType enum.
>   So, since ADSL typically should have the best priority, it was placed above
>   the ethernet device.
> 
> Signed-off-by: Pantelis Koukousoulas 
> ---
>  include/NetworkManager.h |   18 +-
>  introspection/Makefile.am|1 +
>  introspection/nm-device-adsl.xml |   15 ++
>  libnm-util/Makefile.am   |2 +
>  libnm-util/libnm-util.ver|   12 +-
>  libnm-util/nm-setting-adsl.c |  476 
> ++
>  libnm-util/nm-setting-adsl.h |   97 
>  src/Makefile.am  |6 +
>  src/nm-device-adsl.c |   83 +++
>  src/nm-device-adsl.h |   57 +
>  src/nm-udev-manager.c|   48 -
>  11 files changed, 804 insertions(+), 11 deletions(-)
>  create mode 100644 introspection/nm-device-adsl.xml
>  create mode 100644 libnm-util/nm-setting-adsl.c
>  create mode 100644 libnm-util/nm-setting-adsl.h
>  create mode 100644 src/nm-device-adsl.c
>  create mode 100644 src/nm-device-adsl.h
> 
> diff --git a/include/NetworkManager.h b/include/NetworkManager.h
> index 17c3a11..b007e1c 100644
> --- a/include/NetworkManager.h
> +++ b/include/NetworkManager.h
> @@ -92,6 +92,7 @@ typedef enum {
>  /**
>   * NMDeviceType:
>   * @NM_DEVICE_TYPE_UNKNOWN: unknown device
> + * @NM_DEVICE_TYPE_ADSL: ADSL WAN device
>   * @NM_DEVICE_TYPE_ETHERNET: a wired ethernet device
>   * @NM_DEVICE_TYPE_WIFI: an 802.11 WiFi device
>   * @NM_DEVICE_TYPE_UNUSED1: not used
> @@ -106,14 +107,15 @@ typedef enum {
>   */
>  typedef enum {
>   NM_DEVICE_TYPE_UNKNOWN   = 0,
> - NM_DEVICE_TYPE_ETHERNET  = 1,
> - NM_DEVICE_TYPE_WIFI  = 2,
> - NM_DEVICE_TYPE_UNUSED1   = 3,
> - NM_DEVICE_TYPE_UNUSED2   = 4,
> - NM_DEVICE_TYPE_BT= 5,  /* Bluetooth */
> - NM_DEVICE_TYPE_OLPC_MESH = 6,
> - NM_DEVICE_TYPE_WIMAX = 7,
> - NM_DEVICE_TYPE_MODEM = 8,
> + NM_DEVICE_TYPE_ADSL  = 1,

This is actually public API, so we can't change the existing order, we
can only add on to the end.  So NM_DEVICE_TYPE_ADSL will have to be 10,
not 1.

> + NM_DEVICE_TYPE_ETHERNET  = 2,
> + NM_DEVICE_TYPE_WIFI  = 3,
> + NM_DEVICE_TYPE_UNUSED1   = 4,
> + NM_DEVICE_TYPE_UNUSED2   = 5,
> + NM_DEVICE_TYPE_BT= 6,  /* Bluetooth */
> + NM_DEVICE_TYPE_OLPC_MESH = 7,
> + NM_DEVICE_TYPE_WIMAX = 8,
> + NM_DEVICE_TYPE_MODEM = 9,
>  } NMDeviceType;
>  
>  /* General device capability flags */
> diff --git a/introspection/Makefile.am b/introspection/Makefile.am
> index 320245e..4950e7d 100644
> --- a/introspection/Makefile.am
> +++ b/introspection/Makefile.am
> @@ -8,6 +8,7 @@ EXTRA_DIST = \
>   nm-device-wifi.xml \
>   nm-device-olpc-mesh.xml \
>   nm-device-ethernet.xml \
> + nm-device-adsl.xml \
>   nm-device-modem.xml \
>   nm-device-wimax.xml \
>   nm-device.xml \
> diff --git a/introspection/nm-device-adsl.xml 
> b/introspection/nm-device-adsl.xml
> new file mode 100644
> index 000..9610f98
> --- /dev/null
> +++ b/introspection/nm-device-adsl.xml
> @@ -0,0 +1,15 @@
> +
> +
> + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0";>
> +  
> +
> +
> +
> +
> +A dictionary mapping property names to variant boxed values
> +
> +
> +
> +
> +  
> +

At some point we probably do want a 'carrier' property for the ADSL
device just like the ethernet device has one, since if you don't have a
carrier, you don't have sync with the DSLAM, and thus you can't do
anything.  But we can add that a bit later too.

> diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am
> index 0a29e9c..9f452a4 100644
> --- a/libnm-util/Makefi

Re: ANN: Release of NetworkManager 0.8.996 (0.9.0-beta2)

2011-05-09 Thread Peter Robinson
On Mon, May 9, 2011 at 7:13 PM, Dan Williams  wrote:
> On Sun, 2011-05-08 at 22:07 +0100, Peter Robinson wrote:
>> Hi Dan,
>>
>> >> Sorry for the delayed response
>> >>
>> >> Sugar is the other one that comes to mind. It seems to partially work
>> >> if you have a system connection like either a wired ethernet or
>> >> connect to a connection using gnome3 and then login to the sugar
>> >> interface it partially works. I think the issues are two bits. Firstly
>> >> the ability to detect a connection and that its online, secondly
>> >> moving the user settings code over to systems code. Any assistance or
>> >> patches would be welcome (I'm only new to python), sample code in
>> >> python would be useful too (I've only managed to find the anaconda
>> >> patch and it's not much use for the use case).
>> >
>> > Yeah, Sugar would need a patch.  The first part (porting to NM 0.9 for
>> > status information) is pretty easy, the second part where Sugar acts as
>> > an applet is harder, but actually might be fairly simple with NM 0.9.
>> > It's been in the back of my mind for a while, but I haven't gotten
>> > around to doing a proof-of-concept even though I wrote a lot of the
>> > original code for it 5 years ago :)
>>
>> I've done the first hack up of a patch (attached) for NM 0.9. Not sure
>> if it works as I've not got a wifi based F-15 with me at the moment.
>> I'll test it more when I get home from RH summit in the next couple of
>> days. In the mean time is it possible for you to provide some feedback
>> and advise.
>>
>> I'm mostly trying to focus on connection status and wired/wireless
>> ethernet initially although I've changed some of the GSM based stuff.
>> I'm not sure if I've got the GSM/Serial -> Modem changes correct.
>>
>> Also I'm not sure if I've got the NM_ACTIVE_CONNECTION_STATE* bits
>> correct as the .h file upstream only has a 0 error code where the
>> Sugar stuff had numbers for each state.
>>
>>  I've looked at a number of patches but I'm not sure if I've got it
>> all right and I might have confused bits of the compat API too. :-/
>
> Sorry I hadn't gotten around to looking at the Sugar bits yet, but I'll
> happily review what you've got so far.

I've done minor testing in a VM and it had issues with the move from
UserSettings to the new system settings. Would love some help with
that and it would be awesome if we could get something that would work
for basic wifi into f15.

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


Re: [PATCH 0/3] [RFC] Support for ADSL modems

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 14:23 +0300, Pantelis Koukousoulas wrote:
> Hi, before I leave for FOSSCOMM.gr, this patch series implements the initial
> version of the support for ADSL modems in network manager.
> 
> Notes:
>* PPPoA-only for now. I hope that PPPoE can be added with not too much 
> trouble
>  as well, if it is possible to just create a new ethernet device for the 
> "nas0"
>  interface that br2684ctl creates and reuse the already existing "wired" 
> device
>  PPPoE support.
> 
>  This way the adsl part can manage the ATM part of the equation just like 
> it
>  does now for PPPoA.

Well, the PPPoE bits aren't that complicated, so for now I'd rather
duplicate them for the ADSL code, and we can re-merge it later.  Most of
the code is simply detecting whether PPPoE should be used, and if so,
creating a new NMPPPManager object for the interface, then connecting to
the signals that it provides.  But lets get PPPoA working first and
PPPoE can come later.

>* This is the "duct tape and gum" implementation, according to the "first 
> make
>  it work, then make it work right" motto. There are lots of 
> bugs/limitations
>  duplicate code etc but at least it works for me (TM) now :P
> 
>* My initial patch that added everything at once got bounced for moderation
>  due to its size, so (for size and easier reviewing reasons) I split it to
>  3 patches, in a bisect-friendly way (after each patch, NM builds and does
>  something useful)
> 
>* I 'm now happily waiting for your comments / advice / testing etc :) :)

More comments in reply to the patches themselves...

THanks!
Dan

> Cheers,
> Pantelis
>  
> Pantelis Koukousoulas (3):
>   Settings and initial "scaffolding"
>   Carrier Handling and PPP support
>   Add libnm-glib and nmcli code
> 
>  cli/src/connections.c|   66 -
>  cli/src/devices.c|4 +
>  cli/src/settings.c   |   50 
>  cli/src/settings.h   |2 +
>  include/NetworkManager.h |   19 +-
>  introspection/Makefile.am|1 +
>  introspection/nm-device-adsl.xml |   15 +
>  libnm-glib/Makefile.am   |6 +
>  libnm-glib/libnm-glib.ver|4 +-
>  libnm-glib/nm-device-adsl.c  |  236 +++
>  libnm-glib/nm-device-adsl.h  |   62 
>  libnm-glib/nm-device.c   |   10 +-
>  libnm-util/Makefile.am   |2 +
>  libnm-util/libnm-util.ver|   12 +-
>  libnm-util/nm-connection.c   |   25 ++-
>  libnm-util/nm-connection.h   |2 +
>  libnm-util/nm-setting-adsl.c |  476 ++
>  libnm-util/nm-setting-adsl.h |   97 ++
>  src/Makefile.am  |6 +
>  src/nm-device-adsl.c |  596 
> ++
>  src/nm-device-adsl.h |   60 
>  src/nm-udev-manager.c|   48 +++-
>  src/ppp-manager/nm-ppp-manager.c |   31 ++-
>  src/settings/nm-settings.c   |2 +
>  24 files changed, 1804 insertions(+), 28 deletions(-)
>  create mode 100644 introspection/nm-device-adsl.xml
>  create mode 100644 libnm-glib/nm-device-adsl.c
>  create mode 100644 libnm-glib/nm-device-adsl.h
>  create mode 100644 libnm-util/nm-setting-adsl.c
>  create mode 100644 libnm-util/nm-setting-adsl.h
>  create mode 100644 src/nm-device-adsl.c
>  create mode 100644 src/nm-device-adsl.h
> 


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


Re: uClibc: nm-utils.h:30:22: fatal error: execinfo.h: No such file or directory

2011-05-09 Thread Dan Williams
On Sat, 2011-05-07 at 23:35 +0200, Paul Menzel wrote:
> Dear NetworkManager folks,
> 
> 
> trying to use uClibc to build NetworkManager in OpenEmbedded [1]
> (distribution: `minimal-uclibc` for `MACHINE = "beagleboard"`) fails
> with the following error.
> 
> According to this comment in GNOME BTS ticket 146693 [2] (regarding
> aMule) it should be checked for the existence of `execinfo.h` in the
> build system and if it is not available the backtrace calls should be
> made a no op.
> 
> Unfortunately I can not point you to a project already having the
> appropriate checks implemented, but there should be some.
> 
> Being able to compile NetworkManager using uClibc should make
> NetworkManager attractive for some more embedded use cases.

I have no idea why that's there for master (probably left over from the
old nm_warn/nm_error/etc calls) so I've removed it there.

I guess all we can do for 0.8.4 (since this is a public header, and we
can't really #include  there since we don't distribute it) is
try to use uclibc-specific defines to make the nm_print_backtrace() call
be a noop if we're on uclibc?

Dan

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


Re: Howto change port used for 3g modem?

2011-05-09 Thread Dan Williams
On Sat, 2011-05-07 at 11:23 +0100, pera...@portugalmail.pt wrote:
> Dan,
> 
> When I comment out the following line in  77-mm-longcheer-port-types.rules:
> 
> #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1bbb", GOTO="mm_tamobile_vendorcheck"
> 
> then I can connect with the Alcatel X220 however it is shown as a  
> Generic modem in the
> logs and not a type X22X as I would expect.

Right, it won't show as an X22X unless you have an updated ModemManager
with the new x22x plugin.

Dan

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


Re: NM keeps asking for WPA-PSK password.

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 20:30 +0200, Antoni Mont wrote:
> New on that list, sorry if that question was already discussed.
> 
> Problem arises at setting up a netbook Samsung NF310 (network controller 
> BCM 4313 802.11b/g/n) with Ubuntu 11.04 (Natty).
> 
> NM detects my access point (and many others of the neighbourhood) but 
> ask time and again for password, without establishing connection.

That usually means that either the password you gave is invalid, or that
the driver was for some reason unable to connect to the access point.
NM treats inability to connect to the AP as "wrong password" because in
many cases we simply don't know if the failure was password-related or
not.

And the kernel logs say:

May  6 14:03:52 sm1 wpa_supplicant[530]: WPA: 4-Way Handshake failed - 
pre-shared key may be incorrect

which indicate that is the case.  How many characters long is the PSK,
and what characters does it contain?  According to the standards, the
PSK must be 8 - 63 characters long, and can contain only ASCII
characters (ie, no special characters like Ü or whatever).  If your
passprhase does contain those (some APs are buggy and allow it) then you
may need to use a hexadecimal PSK (64 hex characters) that the AP shows
in it's management interface.

(the problem is that the exact conversion from PSK to hex depends on the
language encoding (iso8859-1, iso8859-15, utf8, etc) that your browser
has set when you enter the PSK if you're allowed to type in non-ascii
characters by the AP's management web page.  After the fact we have no
idea what encoding was used when the PSK was entered, thus we have no
way of knowing how to hash the PSK to hex key if non-ascii characters
were actually used)

Dan

> Have tried with Wicd, with similar results: "bad passowrd" (so, 
> probably, not directly related with NM)
> 
> Also tried substituting STA driver by b43-fwcutter + firmware: no way.
> 
> At command line I get:
> 
> montserrat@sm1:~$ iwconfig wlan0
> wlan0 IEEE 802.11bgn  ESSID:"FTE-5C8A"
>Mode:Managed  Frequency:2.412 GHz  Access Point: 
> 94:FE:F4:F9:63:18
>Bit Rate=1 Mb/s   Tx-Power=19 dBm
>Retry  long limit:7   RTS thr:off   Fragment thr:off
>Power Management:off
>Link Quality=70/70  Signal level=-17 dBm
>Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
>Tx excessive retries:0  Invalid misc:0   Missed beacon:0
> 
> As for the file /var/log/syslog, I copy some lines that seems to me 
> significant:
> 
> May  6 14:03:43 sm1 NetworkManager[463]:  (wlan0): supplicant 
> connection state:  disconnected -> scanning
> May  6 14:03:44 sm1 wpa_supplicant[530]: Trying to associate with 
> 94:fe:f4:f9:63:18 (SSID='FTE-5C8A' freq=2412 MHz)
> May  6 14:03:44 sm1 kernel: [ 1579.722485] wlan0: authenticate with 
> 94:fe:f4:f9:63:18 (try 1)
> May  6 14:03:44 sm1 kernel: [ 1579.724784] wlan0: authenticated
> May  6 14:03:44 sm1 kernel: [ 1579.724907] wlan0: associate with 
> 94:fe:f4:f9:63:18 (try 1)
> May  6 14:03:44 sm1 NetworkManager[463]:  (wlan0): supplicant 
> connection state:  scanning -> associating
> May  6 14:03:44 sm1 kernel: [ 1579.729567] wlan0: RX AssocResp from 
> 94:fe:f4:f9:63:18 (capab=0x411 status=0 aid=3)
> May  6 14:03:44 sm1 kernel: [ 1579.729579] wlan0: associated
> May  6 14:03:44 sm1 kernel: [ 1579.731487] Associated:True
> May  6 14:03:44 sm1 wpa_supplicant[530]: Associated with 94:fe:f4:f9:63:18
> May  6 14:03:44 sm1 NetworkManager[463]:  (wlan0): supplicant 
> connection state:  associating -> associated
> May  6 14:03:44 sm1 NetworkManager[463]:  (wlan0): supplicant 
> connection state:  associated -> 4-way handshake
> May  6 14:03:52 sm1 kernel: [ 1587.793433] wlan0: deauthenticated from 
> 94:fe:f4:f9:63:18 (Reason: 15)
> May  6 14:03:52 sm1 kernel: [ 1587.794312] Associated:False
> May  6 14:03:52 sm1 wpa_supplicant[530]: WPA: 4-Way Handshake failed - 
> pre-shared key may be incorrect
> May  6 14:03:52 sm1 wpa_supplicant[530]: CTRL-EVENT-DISCONNECTED 
> bssid=94:fe:f4:f9:63:18 reason=0
> May  6 14:03:52 sm1 kernel: [ 1587.798570] cfg80211: All devices are 
> disconnected, going to restore regulatory settings
> May  6 14:03:52 sm1 kernel: [ 1587.798591] cfg80211: Restoring 
> regulatory settings
> May  6 14:03:52 sm1 kernel: [ 1587.798608] cfg80211: Calling CRDA to 
> update world regulatory domain
> May  6 14:03:52 sm1 NetworkManager[463]:  (wlan0): supplicant 
> connection state:  4-way handshake -> disconnected
> 
> Thanks in advance for any help
> Toni
> 
> 
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list


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


Re: captiveportal autologin

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 13:10 +0200, van Schelve wrote:
> Hi,
> 
>  does someone has an idea about automatically detetect and or login into 
>  an captive portal with networkmanager mechanism.

It's something that we've wanted to do for a while, and there have been
dispatcher scripts for it for a while too.  In the 0.9 API there are
explicit allowances for this step which will make it much smoother to
add than it would have been for 0.8.x.  There's also a mention in the
TODO that outlines possible ways to implement it for anyone that's
interested.

Dan

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


Re: [nm-applet][0.8.4][PATCH] trivial: fix possible uninitialized variable usage

2011-05-09 Thread Dan Williams
On Mon, 2011-05-09 at 13:15 +0200, Paul Menzel wrote:
> Date: Thu, 27 Jan 2011 10:59:37 -0600
> 
>   […]
>   arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 
> -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb 
> --sysroot=/oe/build-angstrom-next/angstrom-dev/s
>   ysroots/armv7a-angstrom-linux-gnueabi -DHAVE_CONFIG_H -I. -I..  
> -pthread -DORBIT2=1 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/incl
>   ude/dbus-1.0 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/dbus-1.0/include
>  -I/oe/build-angstrom-next/angstrom-dev/sysro
>   ots/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/glib-2.0/include
>  -I/home/paul
>   
> /oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/NetworkManager
>  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-lin
>   ux-gnueabi/usr/include/libnm-glib 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gtk-2.0
>  -I/oe/build-angstrom-next/an
>   
> gstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/gtk-2.0/include 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/atk-1.
>   0 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/cairo
>  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstro
>   m-linux-gnueabi/usr/include/pango-1.0 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/pixman-1
>  -I/oe/build-angstrom-ne
>   
> xt/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/freetype2 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/lib
>   png12 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gconf/2
>  -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-a
>   ngstrom-linux-gnueabi/usr/include/orbit-2.0 
> -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gnome-keyring-1
> -DICONDIR=\""/usr
>   /share/icons"\" -DUIDIR=\""/usr/share/nm-applet"\" 
> -DBINDIR=\""/usr/bin"\" -DSYSCONFDIR=\""/etc"\" 
> -DLIBEXECDIR=\""/usr/libexec"\" -DAUTOSTARTDIR=\""/etc/xdg/autostart"\" 
> -DVPN_NAM
>   E_FILES_DIR=\""/etc/NetworkManager/VPN"\" 
> -DNMALOCALEDIR=\"/usr/share/locale\"  -DG_DISABLE_DEPRECATED 
> -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_DEPRECATED -DATK_DISABLE_SINGLE_INC
>   LUDES -DPANGO_DISABLE_DEPRECATED -DPANGO_DISABLE_SINGLE_INCLUDES 
> -DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES 
> -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_
>   INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES 
> -DGCONF_DISABLE_DEPRECATED -DGCONF_DISABLE_SINGLE_INCLUDES 
> -DBONOBO_DISABLE_DEPRECATED -DBONOBO_DISABLE_SINGLE_INCLU
>   DES -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_SINGLE_INCLUDES 
> -DGNOME_DISABLE_DEPRECATED -DGNOME_DISABLE_SINGLE_INCLUDES 
> -DLIBGLADE_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_S
>   INGLE_INCLUDES -DVTE_DISABLE_DEPRECATED -DVTE_DISABLE_SINGLE_INCLUDES 
> -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_SINGLE_INCLUDES 
> -DWNCK_DISABLE_DEPRECATED -DWNCK_DISABLE_SI
>   NGLE_INCLUDES -DLIBSOUP_DISABLE_DEPRECATED 
> -DLIBSOUP_DISABLE_SINGLE_INCLUDES -I../src/marshallers -I../src/utils 
> -I../src/gconf-helpers -I../src/wireless-security   -Wall -Werror -
>   std=gnu89 -fexpensive-optimizations -fomit-frame-pointer 
> -frename-registers -O2 -ggdb2 -Wshadow -Wmissing-declarations 
> -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-eq
>   ual -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -MT 
> nm_applet-applet-dialogs.o -MD -MP -MF .deps/nm_applet-applet-dialogs.Tpo -c 
> -o nm_applet-applet-dialogs.o `tes
>   t -f 'applet-dialogs.c' || echo './'`applet-dialogs.c
>   […]
>   cc1: warnings being treated as errors
>   applet-dialogs.c: In function 'applet_info_dialog_show':
>   applet-dialogs.c:331:22: error: 'method' may be used uninitialized in 
> this function
>   make[3]: *** [nm_applet-applet-dialogs.o] Error 1
> ---
> Unfortunately this patch is only in master and was not applied to 0.8.4
> so that the build fails with the above error message [1]. Therefore in
> OpenEmbedded we need to pass `--enable-more-warings=no` to `configure`.
> 
> This is a cherry-pick from master to a branch based on the tag 0.8.4.

Yeah, that got fixed in commit bbe547f7985498e0bc353ccd2e8e6f9a4a89249b
right after 0.8.4 was released; we probably should do a 0.8.6 soon just
for kicks anyway.  Not a bad idea to speed up releases and get good
fixes out sooner.

Dan


___
networkmanager-list mailing list
net

Re: ANN: Release of NetworkManager 0.8.996 (0.9.0-beta2)

2011-05-09 Thread Dan Williams
On Sun, 2011-05-08 at 22:07 +0100, Peter Robinson wrote:
> Hi Dan,
> 
> >> Sorry for the delayed response
> >>
> >> Sugar is the other one that comes to mind. It seems to partially work
> >> if you have a system connection like either a wired ethernet or
> >> connect to a connection using gnome3 and then login to the sugar
> >> interface it partially works. I think the issues are two bits. Firstly
> >> the ability to detect a connection and that its online, secondly
> >> moving the user settings code over to systems code. Any assistance or
> >> patches would be welcome (I'm only new to python), sample code in
> >> python would be useful too (I've only managed to find the anaconda
> >> patch and it's not much use for the use case).
> >
> > Yeah, Sugar would need a patch.  The first part (porting to NM 0.9 for
> > status information) is pretty easy, the second part where Sugar acts as
> > an applet is harder, but actually might be fairly simple with NM 0.9.
> > It's been in the back of my mind for a while, but I haven't gotten
> > around to doing a proof-of-concept even though I wrote a lot of the
> > original code for it 5 years ago :)
> 
> I've done the first hack up of a patch (attached) for NM 0.9. Not sure
> if it works as I've not got a wifi based F-15 with me at the moment.
> I'll test it more when I get home from RH summit in the next couple of
> days. In the mean time is it possible for you to provide some feedback
> and advise.
> 
> I'm mostly trying to focus on connection status and wired/wireless
> ethernet initially although I've changed some of the GSM based stuff.
> I'm not sure if I've got the GSM/Serial -> Modem changes correct.
> 
> Also I'm not sure if I've got the NM_ACTIVE_CONNECTION_STATE* bits
> correct as the .h file upstream only has a 0 error code where the
> Sugar stuff had numbers for each state.
> 
>  I've looked at a number of patches but I'm not sure if I've got it
> all right and I might have confused bits of the compat API too. :-/

Sorry I hadn't gotten around to looking at the Sugar bits yet, but I'll
happily review what you've got so far.

Dan

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


Re: [PATCH] docs/Makefile.am: use `WITH_DOCS_TRUE` to fix `--with-docs=no`

2011-05-09 Thread Dan Williams
On Sun, 2011-05-08 at 15:22 +0200, Michael Biebl wrote:
> Am 08.05.2011 12:32, schrieb Paul Menzel:
> > Date: Sun, 8 May 2011 12:26:06 +0200
> > 
> > Although passing `--with-docs=no` to `configure` the build system still 
> > tries to include `gtk-doc.make`.
> > 
> 
> gtk-doc should always be included, even if the documentation is not built.
> Otherwise you could end up with a non-functional release tarball.

Though I guess if people really don't want to install gtkdoc, we could
allow --with-docs=no to skip all that, but ensure that
DISTCHECK_CONFIGURE_FLAGS requires it?  As long as the official release
tarballs don't have the issue, I'm not against letting people skip
gtkdoc in their private builds.

Dan

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


Re: [PATCH 0/3] [RFC] Support for ADSL modems

2011-05-09 Thread Dan Williams
On Fri, 2011-05-06 at 11:58 -0300, José Queiroz wrote:
> 
> 
> 2011/5/6 Pantelis Koukousoulas 
> Hi, before I leave for FOSSCOMM.gr, this patch series
> implements the initial
> version of the support for ADSL modems in network manager.
> 
> Notes:
>   * PPPoA-only for now. I hope that PPPoE can be added with
> not too much trouble
> as well, if it is possible to just create a new ethernet
> device for the "nas0"
> interface that br2684ctl creates and reuse the already
> existing "wired" device
> PPPoE support.
> 
> This way the adsl part can manage the ATM part of the
> equation just like it
> does now for PPPoA.
> 
>   * This is the "duct tape and gum" implementation, according
> to the "first make
> it work, then make it work right" motto. There are lots of
> bugs/limitations
> duplicate code etc but at least it works for me (TM)
> now :P
> 
>   * My initial patch that added everything at once got bounced
> for moderation
> due to its size, so (for size and easier reviewing
> reasons) I split it to
> 3 patches, in a bisect-friendly way (after each patch, NM
> builds and does
> something useful)
> 
>   * I 'm now happily waiting for your comments / advice /
> testing etc :) :)
> 
> 
>  Hi,
> 
> Maybe this can be a little off-topic, but is there any intent to add
> support to PPPoE over wifi?

Yes, it's planned but we need a bit of internal re-architecture to
handle it.

Dan


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


[nm-applet][0.8.4][PATCH] trivial: fix possible uninitialized variable usage

2011-05-09 Thread Paul Menzel
Date: Thu, 27 Jan 2011 10:59:37 -0600

[…]
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 
-mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb 
--sysroot=/oe/build-angstrom-next/angstrom-dev/s
ysroots/armv7a-angstrom-linux-gnueabi -DHAVE_CONFIG_H -I. -I..  
-pthread -DORBIT2=1 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/incl
ude/dbus-1.0 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/dbus-1.0/include
 -I/oe/build-angstrom-next/angstrom-dev/sysro
ots/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/glib-2.0/include
 -I/home/paul

/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/NetworkManager
 -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-lin
ux-gnueabi/usr/include/libnm-glib 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gtk-2.0
 -I/oe/build-angstrom-next/an

gstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/gtk-2.0/include 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/atk-1.
0 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/cairo
 -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstro
m-linux-gnueabi/usr/include/pango-1.0 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/pixman-1
 -I/oe/build-angstrom-ne

xt/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/freetype2 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/lib
png12 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gconf/2
 -I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-a
ngstrom-linux-gnueabi/usr/include/orbit-2.0 
-I/oe/build-angstrom-next/angstrom-dev/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/gnome-keyring-1
-DICONDIR=\""/usr
/share/icons"\" -DUIDIR=\""/usr/share/nm-applet"\" 
-DBINDIR=\""/usr/bin"\" -DSYSCONFDIR=\""/etc"\" -DLIBEXECDIR=\""/usr/libexec"\" 
-DAUTOSTARTDIR=\""/etc/xdg/autostart"\" -DVPN_NAM
E_FILES_DIR=\""/etc/NetworkManager/VPN"\" 
-DNMALOCALEDIR=\"/usr/share/locale\"  -DG_DISABLE_DEPRECATED 
-DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_DEPRECATED -DATK_DISABLE_SINGLE_INC
LUDES -DPANGO_DISABLE_DEPRECATED -DPANGO_DISABLE_SINGLE_INCLUDES 
-DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES 
-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_
INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES 
-DGCONF_DISABLE_DEPRECATED -DGCONF_DISABLE_SINGLE_INCLUDES 
-DBONOBO_DISABLE_DEPRECATED -DBONOBO_DISABLE_SINGLE_INCLU
DES -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_SINGLE_INCLUDES 
-DGNOME_DISABLE_DEPRECATED -DGNOME_DISABLE_SINGLE_INCLUDES 
-DLIBGLADE_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_S
INGLE_INCLUDES -DVTE_DISABLE_DEPRECATED -DVTE_DISABLE_SINGLE_INCLUDES 
-DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_SINGLE_INCLUDES 
-DWNCK_DISABLE_DEPRECATED -DWNCK_DISABLE_SI
NGLE_INCLUDES -DLIBSOUP_DISABLE_DEPRECATED 
-DLIBSOUP_DISABLE_SINGLE_INCLUDES -I../src/marshallers -I../src/utils 
-I../src/gconf-helpers -I../src/wireless-security   -Wall -Werror -
std=gnu89 -fexpensive-optimizations -fomit-frame-pointer 
-frename-registers -O2 -ggdb2 -Wshadow -Wmissing-declarations 
-Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-eq
ual -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -MT 
nm_applet-applet-dialogs.o -MD -MP -MF .deps/nm_applet-applet-dialogs.Tpo -c -o 
nm_applet-applet-dialogs.o `tes
t -f 'applet-dialogs.c' || echo './'`applet-dialogs.c
[…]
cc1: warnings being treated as errors
applet-dialogs.c: In function 'applet_info_dialog_show':
applet-dialogs.c:331:22: error: 'method' may be used uninitialized in 
this function
make[3]: *** [nm_applet-applet-dialogs.o] Error 1
---
Unfortunately this patch is only in master and was not applied to 0.8.4
so that the build fails with the above error message [1]. Therefore in
OpenEmbedded we need to pass `--enable-more-warings=no` to `configure`.

This is a cherry-pick from master to a branch based on the tag 0.8.4.

Maybe a 0.8.4.1 release is planned.
---
 src/applet-dialogs.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index 42f3d2b..5965a75 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -328,7 +328,7 @@ info_dialog_add_page (GtkNotebook *notebook,
GtkTable *table;
guint32 speed = 0;
char *str;
-   const char *iface, *method;
+   const char *iface, *method = NULL;