diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-09-30 08:21:46 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2013-10-07 07:45:56 (GMT) |
commit | ae7f8cc988d9d5abfaf1639c218e450d015e2ad0 (patch) | |
tree | c012b1896032bbaa1d58e25ca48b9846637dca48 /python/examples/wiphy.py | |
parent | b9284bcded445a7d245a9c92ffcf3f94d549b621 (diff) | |
download | libnl-ae7f8cc988d9d5abfaf1639c218e450d015e2ad0.zip libnl-ae7f8cc988d9d5abfaf1639c218e450d015e2ad0.tar.gz libnl-ae7f8cc988d9d5abfaf1639c218e450d015e2ad0.tar.bz2 |
python: remove use of PyArg_ParseTuple() for callback result
The message receive callback handler in the netlink api processes
the result object from the python callback. It used PyArg_ParseTuple()
to get the value, but this does not work as intended (see ref [1]).
Instead check the type and convert it accordingly.
refs:
[1] http://stackoverflow.com/questions/13636711/what-is-the-proper-usage-of-pyarg-parsetuple
Reported-by: Teto <mattator@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'python/examples/wiphy.py')
-rw-r--r-- | python/examples/wiphy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/examples/wiphy.py b/python/examples/wiphy.py index fc22205..73e2d4d 100644 --- a/python/examples/wiphy.py +++ b/python/examples/wiphy.py @@ -127,7 +127,7 @@ try: family = genl.genl_ctrl_resolve(s, 'nl80211') m = nl.nlmsg_alloc() genl.genlmsg_put(m, 0, 0, family, 0, 0, nl80211.NL80211_CMD_GET_WIPHY, 0) - nl.nla_put_u32(m, nl80211.NL80211_ATTR_WIPHY, 0) + nl.nla_put_u32(m, nl80211.NL80211_ATTR_WIPHY, 7) err = nl.nl_send_auto_complete(s, m); if err < 0: |