#include "os.h"
#include "common.h"
#include "RRcommon.h"
static void
{
RR_operation_t operation;
solClient_uint32_t operand1 = 9;
solClient_uint32_t operand2 = 5;
double result;
common_handleError ( rc, "solClient_msg_alloc()" );
return;
}
for ( operation = firstOperation; operation <= lastOperation + 1; operation++ ) {
if ( operation <= lastOperation ) {
printf ( "Sending request for %d %s %d\n", operand1, RR_operationToString ( operation ), operand2 );
} else {
printf ( "Sending request for a bad operation '%d %s %d', expect an APP error\n",
operand1, RR_operationToString ( operation ), operand2 );
}
destination.
dest = destinationName;
common_handleError ( rc, "solClient_msg_setDestination()" );
goto freeMsg;
}
common_handleError ( rc, "solClient_msg_createBinaryAttachmentStream()" );
goto freeMsg;
}
common_handleError ( rc, "solClient_container_addInt8()" );
goto freeMsg;
}
common_handleError ( rc, "solClient_container_addInt32()" );
goto freeMsg;
}
common_handleError ( rc, "solClient_container_addInt32()" );
goto freeMsg;
}
common_handleError ( rc, "solClient_msg_getBinaryAttachmentStream()" );
goto freeReplyMsg;
}
common_handleError ( rc, "solClient_container_getBool()" );
goto freeReplyMsg;
}
if ( resultOk ) {
common_handleError ( rc, "solClient_container_getDouble()" );
goto freeReplyMsg;
}
printf ( "Received reply message, result = %f\n", result );
} else {
}
freeReplyMsg:
common_handleError ( rc, "solClient_msg_free()" );
}
} else {
common_handleError ( rc, "solClient_session_sendRequest()" );
}
common_handleError ( rc, "solClient_msg_reset()" );
goto freeMsg;
}
}
freeMsg:
common_handleError ( rc, "solClient_msg_free()" );
}
}
int
main ( int argc, char *argv[] )
{
struct commonOptions commandOpts;
const char *sessionProps[50];
int propIndex = 0;
printf ( "\nRRDirectRequester.c (Copyright 2013-2024 Solace Corporation. All rights reserved.)\n" );
common_initCommandOptions(&commandOpts,
( USER_PARAM_MASK |
DEST_PARAM_MASK ),
( HOST_PARAM_MASK |
PASS_PARAM_MASK |
LOG_LEVEL_MASK |
USE_GSS_MASK |
ZIP_LEVEL_MASK));
if ( common_parseCommandOptions ( argc, argv, &commandOpts, NULL ) == 0 ) {
exit (1);
}
common_handleError ( rc, "solClient_initialize()" );
goto cleanup;
}
common_printCCSMPversion ( );
&context_p, &contextFuncInfo,
sizeof ( contextFuncInfo ) ) ) !=
SOLCLIENT_OK ) {
common_handleError ( rc, "solClient_context_create()" );
goto cleanup;
}
propIndex = 0;
if ( commandOpts.targetHost[0] != (char) 0 ) {
sessionProps[propIndex++] = commandOpts.targetHost;
}
sessionProps[propIndex++] = ( commandOpts.enableCompression ) ? "9" : "0";
sessionProps[propIndex++] = "3";
sessionProps[propIndex++] = "3";
if ( commandOpts.vpn[0] ) {
sessionProps[propIndex++] = commandOpts.vpn;
}
sessionProps[propIndex++] = commandOpts.username;
sessionProps[propIndex++] = commandOpts.password;
if ( commandOpts.useGSS ) {
}
sessionProps[propIndex] = NULL;
context_p,
&session_p, &sessionFuncInfo,
sizeof ( sessionFuncInfo ) ) ) !=
SOLCLIENT_OK ) {
common_handleError ( rc, "solClient_session_create()" );
goto cleanup;
}
common_handleError ( rc, "solClient_session_connect()" );
goto cleanup;
}
sendRequests ( session_p, commandOpts.destinationName);
common_handleError ( rc, "solClient_session_disconnect()" );
}
cleanup:
common_handleError ( rc, "solClient_cleanup()" );
}
goto notInitialized;
notInitialized:
return 0;
}