|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Adding Security Exit Channel in a Mq Connection Code bis |
« View previous topic :: View next topic » |
Author |
Message
|
petiteri |
Posted: Thu Dec 14, 2006 3:18 am Post subject: Adding Security Exit Channel in a Mq Connection Code bis |
|
|
Newbie
Joined: 04 Dec 2006 Posts: 5
|
I forgot i the last post to send you the code of the security exit i would like to use.
Could you just tell me how to call the security exit channel in my main.
Thanks
Eric
here is the code of the security exit a have to use :
void MQENTRY MQMDH001( PMQCXP pChannelExitParams,
PMQCD pChannelDefinition,
PMQLONG pDataLength,
PMQLONG pAgentBufferLength,
PMQBYTE AgentBuffer,
PMQLONG pExitBufferLength,
PMQPTR pExitBufferAddr)
{
/* open the log file */
pChannelExitParams->ExitResponse = MQXCC_OK;
fprintf(fp, "%s", TimeBuffer); ;
pChannelExitParams->Feedback = 0;
switch( pChannelExitParams-> ExitReason )
{
case MQXR_INIT:
MyTime=time(NULL);
pNow=localtime(&MyTime);
strftime(TimeBuffer, sizeof(TimeBuffer), "\nScy exit called for INIT at %A %B %d, %Y at %I:%M %p\n", pNow);
break;
case MQXR_INIT_SEC:
*pDataLength = 9;
pChannelExitParams->ExitResponse = MQXCC_SEND_SEC_MSG;
strncpy((char *)AgentBuffer, "WHOAREYOU\0", 10);
break;
case MQXR_SEC_MSG:
*pDataLength = 20;
pChannelExitParams->ExitResponse = MQXCC_SEND_SEC_MSG;
strncpy((char *)AgentBuffer, "A00078yuyiyi875gthyh \0", 21);
break;
case MQXR_TERM:
fprintf(fp,"Scy exit called for TERM\n");
break;
default:
fprintf(fp,"Scy exit called with invalid reason code: %d\n", pChannelExitParams-> ExitReason);
break;
} /* switch */
fclose(fp);
return;
} /* END OF void MQENTRY MQMDH001( */ |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 14, 2006 3:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
And by convention, this should have been a reply to your original thread, to keep it all together.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|