CUBRID Engine  latest
connection_list_cl.c File Reference
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include "connection_cl.h"
#include "tcp.h"
#include "system_parameter.h"
#include "connection_list_cl.h"
Include dependency graph for connection_list_cl.c:

Go to the source code of this file.

Functions

static CSS_QUEUE_ENTRYcss_make_queue_entry (unsigned int key, char *buffer, int size, CSS_QUEUE_ENTRY *next, int rc, int transid, int invalidate_snapshot, int db_error)
 
static void css_free_queue_entry (CSS_QUEUE_ENTRY *entry_p)
 
static int css_add_entry_to_header (CSS_QUEUE_ENTRY **anchor, unsigned short request_id, char *buffer, int buffer_size, int rc, int transid, int invalidate_snapshot, int db_error)
 
static bool css_is_request_aborted (CSS_CONN_ENTRY *conn, unsigned short request_id)
 
static void css_queue_data_packet (CSS_CONN_ENTRY *conn, unsigned short request_id, NET_HEADER *header)
 
static void css_queue_error_packet (CSS_CONN_ENTRY *conn, unsigned short request_id, NET_HEADER *header)
 
static void css_queue_command_packet (CSS_CONN_ENTRY *conn, unsigned short request_id, NET_HEADER *header, int size)
 
static void css_process_abort_packet (CSS_CONN_ENTRY *conn, unsigned short request_id)
 
CSS_QUEUE_ENTRYcss_find_queue_entry (CSS_QUEUE_ENTRY *header, unsigned int key)
 
void css_queue_remove_header (CSS_QUEUE_ENTRY **anchor)
 
void css_queue_remove_header_entry (CSS_QUEUE_ENTRY **anchor, unsigned short request_id)
 
void css_queue_remove_header_entry_ptr (CSS_QUEUE_ENTRY **anchor, CSS_QUEUE_ENTRY *entry)
 
static int css_queue_packet (CSS_CONN_ENTRY *conn, CSS_QUEUE_ENTRY **queue_p, unsigned short request_id, char *buffer, int size, int rc)
 
int css_queue_user_data_buffer (CSS_CONN_ENTRY *conn, unsigned short request_id, int size, char *buffer)
 
static bool css_recv_and_queue_packet (CSS_CONN_ENTRY *conn, unsigned short request_id, char *buffer, int size, CSS_QUEUE_ENTRY **queue_p)
 
void css_queue_unexpected_data_packet (CSS_CONN_ENTRY *conn, unsigned short request_id, char *buffer, int size, int rc)
 
void css_queue_unexpected_error_packet (CSS_CONN_ENTRY *conn, unsigned short request_id, char *buffer, int size, int rc)
 
static void css_process_close_packet (CSS_CONN_ENTRY *conn)
 
void css_queue_unexpected_packet (int type, CSS_CONN_ENTRY *conn, unsigned short request_id, NET_HEADER *header, int size)
 

Function Documentation

static int css_add_entry_to_header ( CSS_QUEUE_ENTRY **  anchor,
unsigned short  request_id,
char *  buffer,
int  buffer_size,
int  rc,
int  transid,
int  invalidate_snapshot,
int  db_error 
)
static
CSS_QUEUE_ENTRY* css_find_queue_entry ( CSS_QUEUE_ENTRY header,
unsigned int  key 
)
static void css_free_queue_entry ( CSS_QUEUE_ENTRY entry_p)
static

Definition at line 98 of file connection_list_cl.c.

References css_queue_entry::buffer, free_and_init, and NULL.

Referenced by css_queue_remove_header(), css_queue_remove_header_entry(), and css_queue_remove_header_entry_ptr().

Here is the caller graph for this function:

static bool css_is_request_aborted ( CSS_CONN_ENTRY conn,
unsigned short  request_id 
)
static

Definition at line 306 of file connection_list_cl.c.

References css_conn_entry::abort_queue, css_find_queue_entry(), and NULL.

Referenced by css_queue_command_packet(), css_queue_packet(), and css_recv_and_queue_packet().

Here is the caller graph for this function:

static CSS_QUEUE_ENTRY * css_make_queue_entry ( unsigned int  key,
char *  buffer,
int  size,
CSS_QUEUE_ENTRY next,
int  rc,
int  transid,
int  invalidate_snapshot,
int  db_error 
)
static
static void css_process_abort_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id 
)
static
static void css_process_close_packet ( CSS_CONN_ENTRY conn)
static

Definition at line 528 of file connection_list_cl.c.

References CONN_CLOSED, css_shutdown_socket(), css_conn_entry::fd, and css_conn_entry::status.

Referenced by css_queue_unexpected_packet().

Here is the caller graph for this function:

static void css_queue_command_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
NET_HEADER header,
int  size 
)
static
static void css_queue_data_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
NET_HEADER header 
)
static
static void css_queue_error_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
NET_HEADER header 
)
static
static int css_queue_packet ( CSS_CONN_ENTRY conn,
CSS_QUEUE_ENTRY **  queue_p,
unsigned short  request_id,
char *  buffer,
int  size,
int  rc 
)
static
void css_queue_remove_header ( CSS_QUEUE_ENTRY **  anchor)

Definition at line 183 of file connection_list_cl.c.

References css_free_queue_entry(), css_queue_entry::next, and NULL.

Referenced by css_remove_all_unexpected_packets().

Here is the caller graph for this function:

void css_queue_remove_header_entry ( CSS_QUEUE_ENTRY **  anchor,
unsigned short  request_id 
)

Definition at line 220 of file connection_list_cl.c.

References css_free_queue_entry(), css_queue_entry::key, css_queue_entry::next, and NULL.

Referenced by css_process_abort_packet(), and css_return_queued_request().

Here is the caller graph for this function:

void css_queue_remove_header_entry_ptr ( CSS_QUEUE_ENTRY **  anchor,
CSS_QUEUE_ENTRY entry 
)

Definition at line 261 of file connection_list_cl.c.

References assert, css_free_queue_entry(), css_queue_entry::next, and NULL.

Referenced by css_connect_to_cubrid_server(), css_return_data_buffer(), css_return_queued_data(), and css_return_queued_error().

Here is the caller graph for this function:

void css_queue_unexpected_data_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
char *  buffer,
int  size,
int  rc 
)

Definition at line 385 of file connection_list_cl.c.

References css_queue_packet(), and css_conn_entry::data_queue.

Referenced by css_queue_data_packet(), and css_receive_data().

Here is the caller graph for this function:

void css_queue_unexpected_error_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
char *  buffer,
int  size,
int  rc 
)

Definition at line 435 of file connection_list_cl.c.

References css_queue_packet(), and css_conn_entry::error_queue.

Referenced by css_queue_error_packet(), and css_receive_error().

Here is the caller graph for this function:

int css_queue_user_data_buffer ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
int  size,
char *  buffer 
)

Definition at line 342 of file connection_list_cl.c.

Referenced by css_connect_to_cubrid_server(), css_queue_receive_data_buffer(), css_send_request_with_data_buffer(), and css_server_connect_part_two().

Here is the caller graph for this function:

static bool css_recv_and_queue_packet ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
char *  buffer,
int  size,
CSS_QUEUE_ENTRY **  queue_p 
)
static