New function Conn_GetProcStat()
Get PROC_STAT sub-process structure of a given connection.
This commit is contained in:
parent
e4ffcd00bd
commit
bf8b646304
|
@ -68,7 +68,6 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "ng_ipaddr.h"
|
#include "ng_ipaddr.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "proc.h"
|
|
||||||
#include "resolve.h"
|
#include "resolve.h"
|
||||||
#include "tool.h"
|
#include "tool.h"
|
||||||
|
|
||||||
|
@ -2099,6 +2098,22 @@ Conn_GetClient( CONN_ID Idx )
|
||||||
return c ? c->client : NULL;
|
return c ? c->client : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get PROC_STAT sub-process structure of a connection.
|
||||||
|
* @param Idx Connection index number
|
||||||
|
* @return PROC_STAT structure
|
||||||
|
*/
|
||||||
|
GLOBAL PROC_STAT *
|
||||||
|
Conn_GetProcStat(CONN_ID Idx)
|
||||||
|
{
|
||||||
|
CONNECTION *c;
|
||||||
|
|
||||||
|
assert(Idx >= 0);
|
||||||
|
c = array_get(&My_ConnArray, sizeof (CONNECTION), (size_t)Idx);
|
||||||
|
assert(c != NULL);
|
||||||
|
return &c->proc_stat;
|
||||||
|
} /* Conn_GetProcStat */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get CONN_ID from file descriptor associated to a subprocess structure.
|
* Get CONN_ID from file descriptor associated to a subprocess structure.
|
||||||
|
|
|
@ -44,11 +44,11 @@
|
||||||
typedef long CONN_ID;
|
typedef long CONN_ID;
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "proc.h"
|
||||||
|
|
||||||
#ifdef CONN_MODULE
|
#ifdef CONN_MODULE
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "proc.h"
|
|
||||||
#include "array.h"
|
#include "array.h"
|
||||||
#include "tool.h"
|
#include "tool.h"
|
||||||
#include "ng_ipaddr.h"
|
#include "ng_ipaddr.h"
|
||||||
|
@ -115,6 +115,7 @@ GLOBAL void Conn_SyncServerStruct PARAMS(( void ));
|
||||||
|
|
||||||
GLOBAL CONN_ID Conn_GetFromProc PARAMS((int fd));
|
GLOBAL CONN_ID Conn_GetFromProc PARAMS((int fd));
|
||||||
GLOBAL CLIENT* Conn_GetClient PARAMS((CONN_ID i));
|
GLOBAL CLIENT* Conn_GetClient PARAMS((CONN_ID i));
|
||||||
|
GLOBAL PROC_STAT* Conn_GetProcStat PARAMS((CONN_ID i));
|
||||||
#ifdef SSL_SUPPORT
|
#ifdef SSL_SUPPORT
|
||||||
GLOBAL bool Conn_GetCipherInfo PARAMS((CONN_ID Idx, char *buf, size_t len));
|
GLOBAL bool Conn_GetCipherInfo PARAMS((CONN_ID Idx, char *buf, size_t len));
|
||||||
GLOBAL bool Conn_UsesSSL PARAMS((CONN_ID Idx));
|
GLOBAL bool Conn_UsesSSL PARAMS((CONN_ID Idx));
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "ng_ipaddr.h"
|
#include "ng_ipaddr.h"
|
||||||
#include "proc.h"
|
|
||||||
|
|
||||||
#include "exp.h"
|
#include "exp.h"
|
||||||
#include "resolve.h"
|
#include "resolve.h"
|
||||||
|
|
Loading…
Reference in New Issue