API Guide
2-510 API Functions 601355 Rev A
22
23 /* get parameters from user */
24 printf(“*** Cancel parameters ***\n”
);
25 printf(“Enter Request ID ==> “ );
26 req = (VST_REQUEST_ID)
atol(gets(input));
27 printf(“Enter Command Request Type
==> “ );
28 c = (VST_REQUEST_TYPE)
atol(gets(input));
29
30 /* create the command handle */
31 /* Note that the command handle is
not */
32 /* destroyed in this routine, but in
*/
33 /* vst_dispatch when final status is
received. */
34 cmd = VS_Command_Create();
35 if (cmd != (VST_COMMAND_HANDLE )NULL)
36 {
37 /* Send the command to the VolServ
software. */
38 /* Note that status is not
processed here. */
39 /* Instead, it is processed in the
*/
40 /* vst_dispatch routine. Also,
note that */
41 /* default values such as timeout,
value */
42 /* retry limit and priority are
set as */
43 /* default parameters. */
44 rc = VSCMD_Cancel(cmd,
45 VSID_REQUEST_ID, req,
46 VSID_REQUEST_TYPE, c,
47 VSID_ENDFIELD);
48 }