Skip to content
Snippets Groups Projects
Commit d2e4de87 authored by Elemer Lelik's avatar Elemer Lelik
Browse files

Update to R8F

parent bc5a123b
No related branches found
Tags R.8.F
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Copyright (c) 2014 Ericsson Copyright (c) 2015 Ericsson
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0 are made available under the terms of the Eclipse Public License v1.0
...@@ -10,10 +10,8 @@ ...@@ -10,10 +10,8 @@
File: HTTPmsg_CNL113312.tpd File: HTTPmsg_CNL113312.tpd
Description: tpd project file Description: tpd project file
Rev: R8D Rev: R8F
Prodnr: CNL 113 312 Prodnr: CNL 113 312
Updated: 2014-09-03
Contact: http://ttcn.ericsson.se
--> -->
<TITAN_Project_File_Information version="1.0"> <TITAN_Project_File_Information version="1.0">
......
File mode changed from 100644 to 100755
No preview for this file type
File added
No preview for this file type
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// //
// File: HTTPmsg_MessageLen.ttcn // File: HTTPmsg_MessageLen.ttcn
// Description: HTTP Message length calculator // Description: HTTP Message length calculator
// Rev: R8D // Rev: R8F
// Prodnr: CNL 113 469 // Prodnr: CNL 113 469
module HTTPmsg_MessageLen{ module HTTPmsg_MessageLen{
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// //
// File: HTTPmsg_MessageLen_Function.cc // File: HTTPmsg_MessageLen_Function.cc
// Description: HTTP Message length calculator // Description: HTTP Message length calculator
// Rev: R8D // Rev: R8F
// Prodnr: CNL 113 469 // Prodnr: CNL 113 469
#include "HTTPmsg_PT.hh" #include "HTTPmsg_PT.hh"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// //
// File: HTTPmsg_PT.cc // File: HTTPmsg_PT.cc
// Description: HTTP test port implementation // Description: HTTP test port implementation
// Rev: R8D // Rev: R8F
// Prodnr: CNL 113 469 // Prodnr: CNL 113 469
...@@ -459,6 +459,22 @@ int HTTPmsg__PT::send_message_on_fd(int client_id, const unsigned char * message ...@@ -459,6 +459,22 @@ int HTTPmsg__PT::send_message_on_fd(int client_id, const unsigned char * message
return Abstract_Socket::send_message_on_fd(client_id, message_buffer, length_of_message); return Abstract_Socket::send_message_on_fd(client_id, message_buffer, length_of_message);
} }
int HTTPmsg__PT::send_message_on_nonblocking_fd(int client_id, const unsigned char * message_buffer, int length_of_message)
{
log_debug("entering HTTPmsg__PT::(client_id: %d)", client_id);
#ifdef AS_USE_SSL
if(get_user_data(client_id))
{
// INFO: it is assumed that only SSL_Socket assigns user data to each peer
log_debug("leaving HTTPmsg__PT::send_message_on_nonblocking_fd() with returning SSL_Socket::send_message_on_nonblocking_fd()");
return SSL_Socket::send_message_on_nonblocking_fd(client_id, message_buffer, length_of_message);
}
#endif
log_debug("leaving HTTPmsg__PT::send_message_on_nonblocking_fd() with returning Abstract_Socket::send_message_on_nonblocking_fd()");
return Abstract_Socket::send_message_on_nonblocking_fd(client_id, message_buffer, length_of_message);
}
// HTTP specific functions // HTTP specific functions
...@@ -1007,9 +1023,9 @@ void HTTP_decode_chunked_body(TTCN_Buffer* buffer, OCTETSTRING& body, Decoding_P ...@@ -1007,9 +1023,9 @@ void HTTP_decode_chunked_body(TTCN_Buffer* buffer, OCTETSTRING& body, Decoding_P
HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name, "pull %d bytes from %d", chunk_size, buffer->get_read_len()); HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name, "pull %d bytes from %d", chunk_size, buffer->get_read_len());
buffer->set_pos(buffer->get_pos() + chunk_size); buffer->set_pos(buffer->get_pos() + chunk_size);
// hack // hack
if(buffer->get_read_data()[0] == '\n') if(buffer->get_read_len() && buffer->get_read_data()[0] == '\n') // don't read from the buffer if there is nothing in it.
{ {
TTCN_Logger::log(TTCN_WARNING, "hack: adjusted buffer position after the '\\n'"); HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name,"hack: adjusted buffer position after the '\\n'");
buffer->set_pos(buffer->get_pos() + 1); buffer->set_pos(buffer->get_pos() + 1);
} }
HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name, "remaining data: <%s>, len: %d", (const char *)CHARSTRING(buffer->get_read_len(), (const char*)buffer->get_read_data()), buffer->get_read_len()); HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name, "remaining data: <%s>, len: %d", (const char *)CHARSTRING(buffer->get_read_len(), (const char*)buffer->get_read_data()), buffer->get_read_len());
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// //
// File: HTTPmsg_PT.hh // File: HTTPmsg_PT.hh
// Description: HTTP test port header file // Description: HTTP test port header file
// Rev: R8D // Rev: R8F
// Prodnr: CNL 113 469 // Prodnr: CNL 113 469
...@@ -99,6 +99,7 @@ protected: ...@@ -99,6 +99,7 @@ protected:
virtual bool add_user_data(int client_id); virtual bool add_user_data(int client_id);
virtual bool remove_user_data(int client_id); virtual bool remove_user_data(int client_id);
virtual int send_message_on_fd(int client_id, const unsigned char * message_buffer, int length_of_message); virtual int send_message_on_fd(int client_id, const unsigned char * message_buffer, int length_of_message);
virtual int send_message_on_nonblocking_fd(int client_id, const unsigned char * message_buffer, int length_of_message);
virtual int receive_message_on_fd(int client_id); virtual int receive_message_on_fd(int client_id);
virtual void client_connection_opened(int client_id); virtual void client_connection_opened(int client_id);
virtual void listen_port_opened(int port_number); virtual void listen_port_opened(int port_number);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// //
// File: HTTPmsg_Types.ttcn // File: HTTPmsg_Types.ttcn
// Description: HTTP port type definition // Description: HTTP port type definition
// Rev: R8D // Rev: R8F
// Prodnr: CNL 113 469 // Prodnr: CNL 113 469
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// //
// File: HTTPmsg_Types.ttcn // File: HTTPmsg_Types.ttcn
// Description: HTTP Message and TCP connection handling ASP types // Description: HTTP Message and TCP connection handling ASP types
// Rev: R8D // Rev: R8F
// Prodnr: CNL 113 469 // Prodnr: CNL 113 469
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment