[SBI] Do not raise ASSERT when not enough CLIENT pool (#2701)

This commit is contained in:
Sukchan Lee
2023-10-25 21:40:37 +09:00
parent 7a98baf627
commit e3c2fd00d9
12 changed files with 148 additions and 23 deletions

View File

@@ -30,13 +30,13 @@ extern "C" {
#define OGS_SBI_SETUP_CLIENT(__cTX, __pClient) \
do { \
char buf[OGS_ADDRSTRLEN]; \
ogs_assert((__cTX)); \
ogs_assert((__pClient)); \
\
if ((__cTX)->client) { \
ogs_sbi_client_t *client = NULL; \
ogs_sockaddr_t *addr = NULL; \
char buf[OGS_ADDRSTRLEN]; \
\
client = ((__cTX)->client); \
ogs_assert(client); \
@@ -49,6 +49,10 @@ extern "C" {
\
OGS_OBJECT_REF(__pClient); \
((__cTX)->client) = (__pClient); \
ogs_debug("[%d] CLIENT Ref [%s:%d]", \
(__pClient)->reference_count, \
OGS_ADDR((__pClient)->node.addr, buf), \
OGS_PORT((__pClient)->node.addr)); \
} while(0)
typedef int (*ogs_sbi_client_cb_f)(