825 static PyObject *
826 l_ldap_modify_ext( LDAPObject* self, PyObject *args )
827 {
828 char *dn;
829 PyObject *modlist;
830 PyObject *serverctrls = Py_None;
831 PyObject *clientctrls = Py_None;
832 LDAPControl** server_ldcs = NULL;
833 LDAPControl** client_ldcs = NULL;
834
835 int msgid;
836 int ldaperror;
837 LDAPMod **mods;
838
839 if (!PyArg_ParseTuple( args, "sO|OO", &dn, &modlist, &serverctrls, &clientctrls )) return NULL;
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
840 if (not_valid(self)) return NULL;
when considering value == (int)0 from Modules/LDAPObject.c:840
taking False path
841
842 mods = List_to_LDAPMods( modlist, 0 );
843 if (mods == NULL)
when treating unknown struct LDAPMod * * from Modules/LDAPObject.c:842 as non-NULL
taking False path
844 return NULL;
845
846 if (!PyNone_Check(serverctrls)) {
taking True path
847 if (!LDAPControls_from_object(serverctrls, &server_ldcs))
when considering range: 1 <= value <= 0x7fffffff
taking False path
848 return NULL;
849 }
850
851 if (!PyNone_Check(clientctrls)) {
taking True path
852 if (!LDAPControls_from_object(clientctrls, &client_ldcs))
when considering value == (int)0 from Modules/LDAPObject.c:852
taking True path
853 return NULL;
854 }
855
856 LDAP_BEGIN_ALLOW_THREADS( self );
857 ldaperror = ldap_modify_ext( self->ldap, dn, mods, server_ldcs, client_ldcs, &msgid );
858 LDAP_END_ALLOW_THREADS( self );
859
860 LDAPMods_DEL( mods );
861 LDAPControl_List_DEL( server_ldcs );
862 LDAPControl_List_DEL( client_ldcs );
863
864 if ( ldaperror!=LDAP_SUCCESS )
865 return LDAPerror( self->ldap, "ldap_modify_ext" );
866
867 return PyInt_FromLong( msgid );
868 }
returning (PyObject*)NULL without setting an exception
found 3 similar trace(s) to this