Revision 5ec35e48
Added by Marc Dequènes almost 14 years ago
- ID 5ec35e4825856e6090e31b9281b2f620268008da
lib/cyborghood/cyborg/botnet/conversation.rb | ||
---|---|---|
if @split_data_mode
|
||
logger.debug "Protocol info [#{identifier}]: quit split mode for action '#{@split_data_message.action_id}'"
|
||
|
||
parameters = YAML.load(@split_data.join("\n"))
|
||
reply_syntax_error("bad parameters format") if parameters.nil?
|
||
parameters = nil
|
||
begin
|
||
parameters = YAML.load(@split_data.join("\n"))
|
||
rescue
|
||
logger.debug @split_data.join("\n").inspect
|
||
end
|
||
|
||
message = @split_data_message.conv_thread.new_message(@split_data_message.action_code, parameters, @split_data_message.action_id)
|
||
receive_message(message)
|
||
if parameters.nil?
|
||
reply_syntax_error("bad parameters format")
|
||
else
|
||
message = @split_data_message.conv_thread.new_message(@split_data_message.action_code, parameters, @split_data_message.action_id)
|
||
receive_message(message)
|
||
end
|
||
else
|
||
reply_fatal_error "not in split mode"
|
||
end
|
Also available in: Unified diff
[fix] Conversation: don't crash if message parameters cannot be parsed