summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2014-04-30 06:41:20 -0700
committerGiampaolo Rodola' <g.rodola@gmail.com>2014-04-30 06:41:20 -0700
commit50bd135bbbd17c970afc4882b0829900e3d9bb4c (patch)
tree6c280edb7842066e94867eb47a8883ca50a6298c
parent297aa1b5d48c6da2c2814a7bb6fffc1b396b5137 (diff)
downloadpsutil-release-2.1.1.tar.gz
fix issue 460: [Windows] net_io_counters() wraps after 4G.release-2.1.1
-rw-r--r--HISTORY1
-rw-r--r--psutil/_psutil_windows.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 63bc3439..89186e03 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7,6 +7,7 @@ BUG FIXES
* 446: [Windows] fix encoding error when using net_io_counters() on Python 3.
(patch by Szigeti Gabor Niif)
+ * 460: [Windows] net_io_counters() wraps after 4G.
* 491: [Linux] psutil.net_connections() exceptions. (patch by Alexander Grothe)
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index ef7c1627..66943899 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -2334,7 +2334,7 @@ psutil_net_io_counters(PyObject *self, PyObject *args)
goto error;
}
- py_nic_info = Py_BuildValue("(IIIIIIII)",
+ py_nic_info = Py_BuildValue("(kkkkkkkk)",
pIfRow->dwOutOctets,
pIfRow->dwInOctets,
pIfRow->dwOutUcastPkts,