rc = 0; /* Reject the logon operation */
*ReturnCode = rc; /* Assign result to ReturnCode */
}
else /* No error occurred from Retrieve User Info */
{ /* (Bytes_Available = 0) */
/* Set current library for user profile. */
memcpy(InitCurrLib_p, Receiver_var.Current_Library, 10);
if(NULL NEQ strstr("*CRTDFT ",
Receiver_var.Current_Library))
{
memcpy(InitCurrLib_p, "FTPDEFAULT", 10);
}
else
{
if(NULL NEQ strstr(Return1, UserId_p))
{
/* Return ReturnCode of 1 (Continue logon); */
/* Also return user profile and password output */
/* parameters to endure they are ignored by the server.*/
memcpy(UserProfile_p, UserId_p, Lgth_UserId);
memcpy(Password_p, AuthStr_p, Lgth_AuthStr);
Figure 301. Sample FTPLogon Exit Program (Part 19 of 26)
rc = 1; /* Continue the logon operation */
}
else
{
if(NULL NEQ strstr(Return2, UserId_p))
{
/* Return ReturnCode of 2, and initial current library*/
/* Also return user profile and password values */
/* even though they will be ignored by the server. */
memcpy(UserProfile_p, UserId_p, Lgth_UserId);
memcpy(Password_p, AuthStr_p, Lgth_AuthStr);
memcpy(InitCurrLib_p, "FTPEXT2",
strlen("FTPEXT2"));
rc = 2; /* Continue logon; return InitCurLib */
}
else
{
if(NULL NEQ strstr(Return3, UserId_p))
{
/* Return ReturnCode of 3, user profile, password. */
Figure 301. Sample FTPLogon Exit Program (Part 20 of 26)
AppendixE. TCP/IP Application Exit Points and Programs 565