#include <stdlib.h>#include <errno.h>#include <sys/time.h>#include <oci.h>#include "../../dprint.h"#include "../../sr_module.h"#include "ora_con.h"#include "asynch.h"

Go to the source code of this file.
Defines | |
| #define | MAX_TIMEOUT_S 10 |
| #define | MIN_TIMEOUT_MS 100 |
Functions | |
| sword | begin_timelimit (ora_con_t *con, int connect) |
| static sword | change_mode (ora_con_t *con) |
| int | done_timelimit (ora_con_t *con, sword status) |
| static __inline__ int | is_zero_tm (const struct timeval *tv) |
| static sword | remap_status (ora_con_t *con, sword status) |
| int | set_reconnect (unsigned type, const char *val) |
| int | set_timeout (unsigned type, const char *val) |
| static int | set_tv (unsigned type, const char *val, struct timeval *tv) |
| int | wait_timelimit (ora_con_t *con, sword status) |
Variables | |
| static int | cur_asynch_mode |
| static struct timeval | defrest_tm = { .tv_sec = 0, .tv_usec = 200*1000 } |
| static struct timeval | request_tm = { .tv_sec = 3, .tv_usec = 0 } |
| static struct timeval | restore_tm = { .tv_sec = 0, .tv_usec = 200*1000 } |
| static int | synch_mode |
| static struct timeval | wtm |
| sword begin_timelimit | ( | ora_con_t * | con, | |
| int | connect | |||
| ) |
Definition at line 149 of file asynch.c.
References change_mode(), cur_asynch_mode, ora_con::errhp, mode, NULL, request_tm, restore_tm, ora_con::svchp, synch_mode, and wtm.
Referenced by db_oracle_new_connection(), db_oracle_reconnect(), db_oracle_submit_query(), and get_rows().
| static sword change_mode | ( | ora_con_t * | con | ) | [static] |
Definition at line 139 of file asynch.c.
References ora_con::errhp, NULL, and ora_con::svchp.
Referenced by begin_timelimit(), and done_timelimit().
| int done_timelimit | ( | ora_con_t * | con, | |
| sword | status | |||
| ) |
Definition at line 232 of file asynch.c.
References change_mode(), cur_asynch_mode, db_oracle_disconnect(), db_oracle_error(), ora_con::errhp, LM_ERR, NULL, remap_status(), and ora_con::svchp.
Referenced by db_oracle_new_connection(), db_oracle_reconnect(), db_oracle_submit_query(), and get_rows().
| static __inline__ int is_zero_tm | ( | const struct timeval * | tv | ) | [static] |
| static sword remap_status | ( | ora_con_t * | con, | |
| sword | status | |||
| ) | [static] |
Definition at line 194 of file asynch.c.
References ora_con::errhp, and NULL.
Referenced by done_timelimit(), and wait_timelimit().
| int set_reconnect | ( | unsigned | type, | |
| const char * | val | |||
| ) |
Definition at line 125 of file asynch.c.
References defrest_tm, is_zero_tm(), LM_WARN, restore_tm, set_tv(), and synch_mode.
| int set_timeout | ( | unsigned | type, | |
| const char * | val | |||
| ) |
Definition at line 108 of file asynch.c.
References defrest_tm, is_zero_tm(), request_tm, restore_tm, set_tv(), and synch_mode.
| static int set_tv | ( | unsigned | type, | |
| const char * | val, | |||
| struct timeval * | tv | |||
| ) | [static] |
Definition at line 63 of file asynch.c.
References LM_ERR, MAX_TIMEOUT_S, MIN_TIMEOUT_MS, s, and STR_PARAM.
Referenced by set_reconnect(), and set_timeout().
| int wait_timelimit | ( | ora_con_t * | con, | |
| sword | status | |||
| ) |
Definition at line 212 of file asynch.c.
References cur_asynch_mode, NULL, remap_status(), and wtm.
Referenced by db_oracle_new_connection(), db_oracle_reconnect(), db_oracle_submit_query(), and get_rows().
int cur_asynch_mode [static] |
Definition at line 50 of file asynch.c.
Referenced by begin_timelimit(), done_timelimit(), and wait_timelimit().
struct timeval defrest_tm = { .tv_sec = 0, .tv_usec = 200*1000 } [static] |
struct timeval request_tm = { .tv_sec = 3, .tv_usec = 0 } [static] |
struct timeval restore_tm = { .tv_sec = 0, .tv_usec = 200*1000 } [static] |
Definition at line 46 of file asynch.c.
Referenced by begin_timelimit(), set_reconnect(), and set_timeout().
int synch_mode [static] |
Definition at line 49 of file asynch.c.
Referenced by begin_timelimit(), set_reconnect(), and set_timeout().
struct timeval wtm [static] |
1.5.6