Share this page

# 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);
    }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: