asynch.c File Reference

#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"

Include dependency graph for asynch.c:

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


Define Documentation

#define MAX_TIMEOUT_S   10

Definition at line 38 of file asynch.c.

Referenced by set_tv().

#define MIN_TIMEOUT_MS   100

Definition at line 39 of file asynch.c.

Referenced by set_tv().


Function Documentation

sword begin_timelimit ( ora_con_t con,
int  connect 
)

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 
)

static __inline__ int is_zero_tm ( const struct timeval *  tv  )  [static]

Definition at line 54 of file asynch.c.

Referenced by set_reconnect(), and set_timeout().

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 
)


Variable Documentation

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]

Definition at line 47 of file asynch.c.

Referenced by set_reconnect(), and set_timeout().

struct timeval request_tm = { .tv_sec = 3, .tv_usec = 0 } [static]

Definition at line 43 of file asynch.c.

Referenced by begin_timelimit(), and set_timeout().

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]

Definition at line 51 of file asynch.c.

Referenced by begin_timelimit(), and wait_timelimit().


Generated on Thu May 17 12:00:34 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6