MXS-2196: Move dcb_accept into listener.cc

Moved the code into listener.cc as it's the only place where it is
used. Placed the DCB callback assignment into the DCB constructor as it
depended on static functions that were in dcb.cc.
This commit is contained in:
Markus Mäkelä
2018-12-01 21:13:21 +02:00
parent b3fbc6aa3d
commit 6cf672195a
4 changed files with 192 additions and 199 deletions

View File

@ -262,8 +262,7 @@ typedef enum
*/
void dcb_global_init();
int dcb_write(DCB*, GWBUF*);
DCB* dcb_accept(const SListener& listener);
int dcb_write(DCB*, GWBUF*);
DCB* dcb_alloc(dcb_role_t, const SListener&, SERVICE* service);
DCB* dcb_connect(struct server*, struct session*, const char*);
int dcb_read(DCB*, GWBUF**, int);

View File

@ -246,8 +246,6 @@ private:
// Handler for EPOLL_IN events
static uint32_t poll_handler(MXB_POLL_DATA* data, MXB_WORKER* worker, uint32_t events);
friend DCB* dcb_accept(const SListener& listener);
};
/**