ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Adding Security Exit Channel in a Mq Connection Code bis

Post new topic  Reply to topic
 Adding Security Exit Channel in a Mq Connection Code bis « View previous topic :: View next topic » 
Author Message
petiteri
PostPosted: Thu Dec 14, 2006 3:18 am    Post subject: Adding Security Exit Channel in a Mq Connection Code bis Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Dec 14, 2006 3:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Adding Security Exit Channel in a Mq Connection Code bis
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.