|
|
@ -5099,7 +5099,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds) |
|
|
|
|
|
|
|
|
#ifdef MS_WINDOWS |
|
|
#ifdef MS_WINDOWS |
|
|
/* In this case, we don't use the family, type and proto args */ |
|
|
/* In this case, we don't use the family, type and proto args */ |
|
|
if (fdobj != NULL && fdobj != Py_None) |
|
|
|
|
|
|
|
|
if (fdobj == NULL || fdobj == Py_None) |
|
|
#endif |
|
|
#endif |
|
|
{ |
|
|
{ |
|
|
if (PySys_Audit("socket.__new__", "Oiii", |
|
|
if (PySys_Audit("socket.__new__", "Oiii", |
|
|
@ -5121,8 +5121,9 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds) |
|
|
} |
|
|
} |
|
|
memcpy(&info, PyBytes_AS_STRING(fdobj), sizeof(info)); |
|
|
memcpy(&info, PyBytes_AS_STRING(fdobj), sizeof(info)); |
|
|
|
|
|
|
|
|
if (PySys_Audit("socket()", "iii", info.iAddressFamily, |
|
|
|
|
|
info.iSocketType, info.iProtocol) < 0) { |
|
|
|
|
|
|
|
|
if (PySys_Audit("socket.__new__", "Oiii", s, |
|
|
|
|
|
info.iAddressFamily, info.iSocketType, |
|
|
|
|
|
info.iProtocol) < 0) { |
|
|
return -1; |
|
|
return -1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|