Ignore:
Timestamp:
Nov 29, 2012, 1:59:04 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/librpc/gen_ndr/py_samr.c

    r745 r751  
    67286728        struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(obj);
    67296729        PyObject *py_filterModuleName;
    6730         if (object->filterModuleName == NULL) {
    6731                 py_filterModuleName = Py_None;
    6732                 Py_INCREF(py_filterModuleName);
    6733         } else {
    6734                 if (object->filterModuleName == NULL) {
    6735                         py_filterModuleName = Py_None;
    6736                         Py_INCREF(py_filterModuleName);
    6737                 } else {
    6738                         py_filterModuleName = PyUnicode_Decode(object->filterModuleName, strlen(object->filterModuleName), "utf-8", "ignore");
    6739                 }
    6740         }
     6730        py_filterModuleName = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->filterModuleName);
    67416731        return py_filterModuleName;
    67426732}
     
    67456735{
    67466736        struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(py_obj);
    6747         if (value == Py_None) {
    6748                 object->filterModuleName = NULL;
    6749         } else {
    6750                 object->filterModuleName = NULL;
    6751                 if (PyUnicode_Check(value)) {
    6752                         object->filterModuleName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
    6753                 } else if (PyString_Check(value)) {
    6754                         object->filterModuleName = PyString_AS_STRING(value);
    6755                 } else {
    6756                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6757                         return -1;
    6758                 }
    6759         }
     6737        PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
     6738        if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
     6739                PyErr_NoMemory();
     6740                return -1;
     6741        }
     6742        object->filterModuleName = *(struct lsa_String *)py_talloc_get_ptr(value);
    67606743        return 0;
    67616744}
Note: See TracChangeset for help on using the changeset viewer.