Ignore:
Timestamp:
31/05/06 17:03:55 (14 years ago)
Author:
spascoe
Message:

Python code can read an authorisation message from the client.

Test cases confirm message passing client->server->python is working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/bbftpd_private_user.c

    r1074 r1075  
    9797int bbftpd_private_auth(char *logmessage) 
    9898{ 
     99 
     100#ifdef NDG_PYTHON_EMBED 
    99101  char *username; 
     102 
     103  if (bbftpd_private_auth_callback(logmessage) == -1) { 
     104    return -1; 
     105  } 
     106  if ((username = bbftpd_private_auth_getusername(logmessage)) == NULL) { 
     107    return -1; 
     108  } 
     109    
     110  sprintf(currentusername, "%.*s", MAXLEN, username); 
     111#else 
    100112 
    101113  char msg[NDG_MESSAGE_LEN]; 
     
    108120  } 
    109121 
    110 #ifdef NDG_PYTHON_EMBED 
    111   if (bbftpd_private_auth_callback(logmessage) == -1) { 
    112     return -1; 
    113   } 
    114   if ((username = bbftpd_private_auth_getusername(logmessage)) == NULL) { 
    115     return -1; 
    116   } 
    117     
    118   sprintf(currentusername, "%.*s", MAXLEN, username); 
    119122#endif 
    120123 
Note: See TracChangeset for help on using the changeset viewer.