Community
Participate
Working Groups
Build Identifier: rev 1079 Since revision 900, it's impossible to use the script functionality with the C client. The client report the channel as closed even if it's not : Reply error 131077: Channel closed. This is due to the addition of an if statement in protocol.c at line 429 (last revision): if (c->peer_service_list == NULL) { post_event(send_command_failed, rh); } This statement checks if the remote agent has any services. Since the "hello" message is not received at the time of sending the command, the client report the connection as closed. Removing this check resolve the problem. Removing the check is probably not the best option. Adding a sleep after a connect command in the client is not either but I am not sure how you want to solve this. Reproducible: Always Steps to Reproduce: 1. Start an agent with at least one service that you will use to send a command. 2. Create a script file with a connect statement followed by any command (see attachment for an example). 3. Start the client with the script you just created : client -S test 4. The client report that the channel is closed.
Created attachment 175347 [details] Script test example
"connect" command handler in cmdline.c calls cmd_done() when a channel socket is connected, which is too early. I have changed the code to call cmd_done() when the channel itself (not just the socket) is connected.
Moving bugs to new home for IP log.
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3