Example: lr_exit
In the following example, lr_exit stops running the Vuser if the connection with the ftp server fails.
vuser_init() {
int status = ftp_logon("FTP", "URL=ftp://user:pwd@ftp.merc-int.com", "LocalAddr=ca_server:21", "ClientCert=/ca/pem/",
"ClientKey=/ca/pem/key/", "ClientPassword=@3#$8800cvd",
"CertificateAuthority=/ca/", "SSLVersion=SSL3", LAST );
if (status == LR_FAIL) { lr_error_message ("ftp login failed");
lr_exit(LR_EXIT_VUSER, LR_FAIL);
}
return(0);
}