public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [RFC 1/2] batman-adv: invoke post_func only if the attribute has been changed
Date: Wed, 6 Mar 2013 11:54:23 +0100	[thread overview]
Message-ID: <20130306105423.GI1400@ritirata.org> (raw)
In-Reply-To: <201303061853.03020.lindner_marek@yahoo.de>

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

On Wed, Mar 06, 2013 at 06:53:02PM +0800, Marek Lindner wrote:
> On Wednesday, March 06, 2013 18:33:00 Antonio Quartulli wrote:
> > @@ -169,7 +169,7 @@ __batadv_store_bool_attr(char *buff, size_t count,
> >  
> >         ret = batadv_store_bool_attr(buff, count, net_dev, attr->name,
> >                                      attr_store);
> > -       if (post_func && ret)
> > +       if (post_func && ret > 0)
> >                 post_func(net_dev);
> >  
> >         return ret;
> 
> If I remember correctly the shell or some other system between the kernel and 
> userspace did not like to have 0 returned. It resulted in some funny "try to 
> set this value over and over" reaction. You might want to test that.

Oh ok. I will look for that. I think in that case we can simply change the value
returned by __batadv_store_bool_attr() and leave batadv_store_bool_attr()
returning 0 so that from outside we can still understand if the value has been
changed or not.

Thanks a lot!
Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-03-06 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 10:33 [B.A.T.M.A.N.] [RFC 1/2] batman-adv: invoke post_func only if the attribute has been changed Antonio Quartulli
2013-03-06 10:33 ` [B.A.T.M.A.N.] [RFC 2/2] batman-adv: enable/disable promiscuous mode on interface when needed Antonio Quartulli
2013-03-06 10:53 ` [B.A.T.M.A.N.] [RFC 1/2] batman-adv: invoke post_func only if the attribute has been changed Marek Lindner
2013-03-06 10:54   ` Antonio Quartulli [this message]

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20130306105423.GI1400@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

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

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