Changeset 1124 for TI05-delivery/trunk


Ignore:
Timestamp:
07/06/06 14:15:40 (13 years ago)
Author:
spascoe
Message:

Changed the interface to authentication context objects. Now call the object
rather than invoke the method authorise() to start a session.

Location:
TI05-delivery/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/python_ext/bbftpd.c

    r1100 r1124  
    5454  } 
    5555 
    56   if ((authzContext = PyObject_CallMethod(authContext, "authorise", "")) == NULL) { 
     56  if ((authzContext = PyObject_CallObject(authContext, NULL)) == NULL) { 
    5757    //!TODO: should probably read the exception object to fill logmessage. 
    5858    sprintf(logmessage, "bbftpd_private_auth_callback: authContext.authorise() failed"); 
  • TI05-delivery/trunk/test/test_embedded.py

    r1104 r1124  
    3030 
    3131class AuthContext: 
    32     def authorise(self): 
     32    def __call__(self): 
    3333        # Read the auth version message 
    3434        msg = bbftpd.recv() 
     
    5656 
    5757class FailingAuthContext(AuthContext): 
    58     def authorise(self): 
     58    def __call__(self): 
    5959        az = super(FailingAuthContext).authorise() 
    6060        return None 
Note: See TracChangeset for help on using the changeset viewer.