MXS-2196: Pass the SERVICE pointer when allocating a DCB

The value would otherwise be assigned outside of it and in some cases not
at all. Now all DCBs (apart from internal ones) have a valid SERVICE
pointer.

The SERV_LISTENER pointer should not be in the DCBs but in the
session. This way the listener is an attribute of a session instead of a
connection. If this is implemented, the authenticator data can be more
easily shared.
This commit is contained in:
Markus Mäkelä
2018-11-29 17:25:15 +02:00
parent bb295b5cbe
commit 67626d6c32
5 changed files with 8 additions and 7 deletions

View File

@ -51,7 +51,7 @@ static int test1()
SERV_LISTENER* dummy = nullptr;
/* Single buffer tests */
fprintf(stderr, "testdcb : creating buffer with type DCB_ROLE_INTERNAL");
dcb = dcb_alloc(DCB_ROLE_INTERNAL, dummy);
dcb = dcb_alloc(DCB_ROLE_INTERNAL, dummy, NULL);
printDCB(dcb);
fprintf(stderr, "\t..done\nAllocated dcb.");
// TODO: Without running workers, the following will hang. As it does not

View File

@ -59,7 +59,7 @@ static int test1()
"testpoll : Initialise the polling system.");
init_test_env(NULL);
fprintf(stderr, "\t..done\nAdd a DCB");
dcb = dcb_alloc(DCB_ROLE_CLIENT_HANDLER, dummy);
dcb = dcb_alloc(DCB_ROLE_CLIENT_HANDLER, dummy, NULL);
if (dcb == NULL)
{