Welcome Guest ( Log In | Register )


 
Reply to this topicNew Topic
User Exits - How to enable?!, feels like an invitation to exit!
psamman
post Feb 22 2010, 04:20 PM
Post #1


Contributor
**

Group: Members
Posts: 28
Joined: 15-January 09
Member No.: 283


Hi there,

Can someone please explain how to enable User Exits for a specific Remote Site / protocol?
Where would the output from a "printf" in a User Exit end up? In log.dat?
Is it ok for .c User Exits not to have a main() entry?!

Any help appreciated.
Go to the top of the page
 
+Quote Post
coincoin
post Feb 24 2010, 12:56 PM
Post #2


Visitor
*

Group: Members
Posts: 3
Joined: 25-November 08
Member No.: 217


Hi,


Can someone please explain how to enable User Exits for a specific Remote Site / protocol?

I think you must select the right user exit and add a condition when there is a specific action to do.

Where would the output from a "printf" in a User Exit end up? In log.dat?

the Printf output goes to STDOUT
the LogPrintf output goes to log.dat
Example :
LogPrintf(ITP_LOG_INFO, "Obtaining port number from: in->login_sap=%s", in->login_sap);

Is it ok for .c User Exits not to have a main() entry?!
I don't know ! Sorry !

Go to the top of the page
 
+Quote Post
Mario128
post Feb 25 2010, 09:27 AM
Post #3


Regular Contributor
Group Icon

Group: Axway Moderator
Posts: 31
Joined: 6-November 08
From: Paris
Member No.: 100


hi
there is no main, because Exits are functions called by Gateway itself ( that mean main has been already called by Gateway startup )
By default all exits are called, but they do nothing, until you write your own code to do what you want smile.gif
Go to the top of the page
 
+Quote Post
psamman
post Feb 25 2010, 04:56 PM
Post #4


Contributor
**

Group: Members
Posts: 28
Joined: 15-January 09
Member No.: 283


Thank you coincoin & Raphael, that helps !

I'm still a little confused as of how my code (in an exituser.c for example) would be called.
Say I define a function f(){...} and compile. Is f executed automatically, or do I have to add the call
"f();" at the end of the source file?
Go to the top of the page
 
+Quote Post
DELORME ALAIN - ...
post Feb 26 2010, 07:35 AM
Post #5


Visitor
*

Group: Members
Posts: 7
Joined: 28-November 08
Member No.: 223


QUOTE (psamman @ Feb 25 2010, 05:56 PM) *
Thank you coincoin & Raphael, that helps !

I'm still a little confused as of how my code (in an exituser.c for example) would be called.
Say I define a function f(){...} and compile. Is f executed automatically, or do I have to add the call
"f();" at the end of the source file?


Hi,

The entry point of user exit are specifics functions indicated on file src/exituser/exitProtocol.c
The list and description of these functions are indicated on the documentation (search internal user exits)

The gateway's User exits, unlike CFT exits, are hooks to hack the defaut behavior of the Gateway (for instance, to indicate the IP adress to use for a FTP PASV command)
If you want to execute a C program when a transfer for a specific Remote Site is ended (like CFT exits), I suppose that you must use a decision rule. To acces transfer parameters on a external C program I suppose you must use the getenv to retrieve x_parameters.

regards,

alain
Go to the top of the page
 
+Quote Post
psamman
post Feb 26 2010, 10:56 AM
Post #6


Contributor
**

Group: Members
Posts: 28
Joined: 15-January 09
Member No.: 283


QUOTE (DELORME ALAIN - MIOCT @ Feb 26 2010, 08:35 AM) *
The entry point of user exit are specifics functions indicated on file src/exituser/exitProtocol.c

The gateway's User exits, unlike CFT exits, are hooks to hack the defaut behavior of the Gateway (for instance, to indicate the IP adress to use for a FTP PASV command)


Oh ! I think I got it this time: you mean User Exits are called systematically if the .o exists in obj/ directory, even if they are dummy? huh.gif
Because they are dummy by default, the "#if 0" makes them: basically, functions have no bodies.
If that is true, if I remove the "#if 0" from ExitFtpRespPasv() in exitftp.c for example, I do not need to add a call to this function "ExitFtpRespPasv();" at the bottom of exitftp.c? This only makes sense, because I don't see what arguments I would be passing!

Please somebody confirm/correct me.

I know how to use decision rules to trigger a processing after a transfer. That's not what I need. I'm specifically interested in User Exits for they allow actions during a transfer.

Thanks, people.
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Skin designed by IPB Forum Skins