Skip to content

Commit

Permalink
fix #774 / net_io_counters / freebsd: provide dropout metrics if avai…
Browse files Browse the repository at this point in the history
…lable
  • Loading branch information
giampaolo committed Feb 15, 2016
1 parent 3f57ee8 commit 984f060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Bug tracker at https://github.com/giampaolo/psutil/issues

**Bug fixes**

- #774: [FreeBSD] net_io_counters() dropout is no longer set to 0 if the kernel
provides it.
- #776: [Linux] Process.cpu_affinity() may erroneously raise NoSuchProcess.
(patch by wxwright)

Expand Down
7 changes: 6 additions & 1 deletion psutil/_psutil_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,12 @@ psutil_net_io_counters(PyObject *self, PyObject *args) {
if2m->ifm_data.ifi_ierrors,
if2m->ifm_data.ifi_oerrors,
if2m->ifm_data.ifi_iqdrops,
0); // dropout not supported
#ifdef _IFI_OQDROPS
if2m->ifm_data.ifi_oqdrops
#else
0
#endif
);
if (!py_ifc_info)
goto error;
if (PyDict_SetItemString(py_retdict, ifc_name, py_ifc_info))
Expand Down

0 comments on commit 984f060

Please sign in to comment.