1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

pynet: Create a net class.

This commit is contained in:
Jelmer Vernooij
2010-03-01 22:23:45 +01:00
parent 7a6f1c7842
commit 814e20e7da
10 changed files with 118 additions and 91 deletions

View File

@ -206,14 +206,15 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "Oi", &py_lp_ctx, &all_interfaces))
return NULL;
lp_ctx = lp_from_py_object(py_lp_ctx);
tmp_ctx = talloc_new(NULL);
lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
if (lp_ctx == NULL) {
PyErr_SetString(PyExc_TypeError, "Expected loadparm object");
talloc_free(tmp_ctx);
return NULL;
}
tmp_ctx = talloc_new(NULL);
load_interfaces(tmp_ctx, lp_interfaces(lp_ctx), &ifaces);
count = iface_count(ifaces);