Finalise comments; change abort from assert(false) to raise(SIGABRT).
This commit is contained in:
@ -60,6 +60,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <dcb.h>
|
||||
#include <spinlock.h>
|
||||
#include <server.h>
|
||||
@ -1908,7 +1909,7 @@ dcb_close(DCB *dcb)
|
||||
pthread_self(),
|
||||
dcb,
|
||||
STRDCBSTATE(dcb->state))));
|
||||
assert(false);
|
||||
raise(SIGABRT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -15,10 +15,12 @@
|
||||
*
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <errno.h>
|
||||
#include <poll.h>
|
||||
@ -290,7 +292,7 @@ poll_add_dcb(DCB *dcb)
|
||||
pthread_self(),
|
||||
dcb,
|
||||
STRDCBSTATE(dcb->state))));
|
||||
assert(false);
|
||||
raise(SIGABRT);
|
||||
}
|
||||
if (DCB_STATE_POLLING == dcb->state
|
||||
|| DCB_STATE_LISTENING == dcb->state)
|
||||
@ -379,7 +381,7 @@ poll_remove_dcb(DCB *dcb)
|
||||
* things have gone wrong and we crash.
|
||||
*/
|
||||
if (rc) rc = poll_resolve_error(dcb, errno, false);
|
||||
if (rc) assert(false);
|
||||
if (rc) raise(SIGABRT);
|
||||
/*< Set bit for each maxscale thread */
|
||||
bitmask_copy(&dcb->memdata.bitmask, poll_bitmask());
|
||||
return rc;
|
||||
@ -449,7 +451,7 @@ poll_resolve_error(DCB *dcb, int errornum, bool adding)
|
||||
if (ENOMEM == errornum) assert (!(ENOMEM == errornum));
|
||||
if (EPERM == errornum) assert (!(EPERM == errornum));
|
||||
/* Undocumented error number */
|
||||
assert(false);
|
||||
raise(SIGABRT);
|
||||
}
|
||||
|
||||
#define BLOCKINGPOLL 0 /*< Set BLOCKING POLL to 1 if using a single thread and to make
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
* Date Who Description
|
||||
* 08/07/2013 Massimiliano Pinto Initial version
|
||||
* 09/07/2013 Massimiliano Pinto Added /show?dcb|session for all dcbs|sessions
|
||||
* 07/07/2015 Martin Brampton Fixed problems with DCBs on errors
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
@ -58,6 +58,7 @@ extern __thread log_info_t tls_log_info;
|
||||
* Revision History
|
||||
* Date Who Description
|
||||
* 13/06/2014 Mark Riddoch Initial implementation
|
||||
* 07/07/15 Martin Brampton Correct failure handling
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
* 03/10/2014 Massimiliano Pinto Added netmask for wildcard in IPv4 hosts.
|
||||
* 24/10/2014 Massimiliano Pinto Added Mysql user@host @db authentication support
|
||||
* 10/11/2014 Massimiliano Pinto Charset at connect is passed to backend during authentication
|
||||
* 07/07/15 Martin Brampton Fix problem recognising null password
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -67,6 +67,7 @@ extern __thread log_info_t tls_log_info;
|
||||
* Date Who Description
|
||||
* 17/06/2013 Mark Riddoch Initial version
|
||||
* 17/07/2013 Mark Riddoch Addition of login phase
|
||||
* 07/07/2015 Martin Brampton Call unified dcb_close on error
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user