Improved some code documentation
Added the -Wall option to the protocol module Makefile Fixed warnings in telnetd
This commit is contained in:
parent
9e2a41c2b7
commit
1595725494
@ -35,7 +35,8 @@ HDRS= ../include/atomic.h ../include/buffer.h ../include/dcb.h \
|
||||
../include/modules.h ../include/poll.h ../include/config.h ../include/users.h \
|
||||
../include/hashtable.h
|
||||
OBJ=$(SRCS:.c=.o)
|
||||
LIBS=-L../inih/extra -linih -lssl -lstdc++ -L/packages/mariadb-5.5.25/libmysql -lmysqlclient \
|
||||
LIBS=-L../inih/extra -linih -lssl -lstdc++ \
|
||||
-L/packages/mariadb-5.5.25/libmysql -lmysqlclient \
|
||||
-lz -lm -lcrypto
|
||||
|
||||
gateway: $(OBJ)
|
||||
|
@ -317,6 +317,7 @@ HASHENTRIES *entries;
|
||||
/**
|
||||
* Print hash table statistics to a DCB
|
||||
*
|
||||
* @param dcb The DCB to send the information to
|
||||
* @param table The hash table
|
||||
*/
|
||||
void
|
||||
|
@ -64,3 +64,4 @@ MySQLProtocol * gw_mysql_init(MySQLProtocol *ptr);
|
||||
int MySQLWrite(DCB *dcb, GWBUF *queue);
|
||||
int gw_write_backend_event(DCB *dcb);
|
||||
int gw_read_backend_event(DCB *dcb);
|
||||
int setnonblocking(int fd);
|
||||
|
@ -20,7 +20,7 @@
|
||||
# 17/06/2013 Massimiliano Pinto Added mysql_common top both libraries
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include -g
|
||||
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include -Wall -g
|
||||
LDFLAGS=-shared
|
||||
MYSQLCLIENTSRCS=mysql_client.c mysql_common.c
|
||||
MYSQLCLIENTOBJ=$(MYSQLCLIENTSRCS:.c=.o)
|
||||
|
@ -171,28 +171,45 @@ telnetd.o: telnetd.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stdarg.h \
|
||||
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
|
||||
/usr/include/stdlib.h /usr/include/bits/waitflags.h \
|
||||
/usr/include/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/bits/endian.h /usr/include/bits/byteswap.h \
|
||||
/usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
|
||||
/usr/include/bits/select.h /usr/include/bits/sigset.h \
|
||||
/usr/include/bits/time.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/string.h /usr/include/xlocale.h ../../include/dcb.h \
|
||||
../../include/spinlock.h ../../include/thread.h /usr/include/pthread.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/bits/byteswap.h /usr/include/sched.h /usr/include/time.h \
|
||||
/usr/include/bits/sched.h /usr/include/bits/time.h \
|
||||
/usr/include/bits/pthreadtypes.h /usr/include/bits/setjmp.h \
|
||||
../../include/buffer.h ../../include/service.h ../../include/server.h \
|
||||
../../include/session.h /usr/include/sys/ioctl.h \
|
||||
/usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
|
||||
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
|
||||
/usr/include/asm/ioctl.h /usr/include/asm-generic/ioctl.h \
|
||||
/usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \
|
||||
/usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
/usr/include/sys/socket.h /usr/include/sys/uio.h \
|
||||
/usr/include/sys/types.h /usr/include/sys/select.h \
|
||||
/usr/include/bits/select.h /usr/include/bits/sigset.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/bits/uio.h \
|
||||
/usr/include/sched.h /usr/include/bits/sched.h \
|
||||
/usr/include/bits/setjmp.h ../../include/buffer.h \
|
||||
../../include/service.h ../../include/server.h ../../include/session.h \
|
||||
/usr/include/sys/ioctl.h /usr/include/bits/ioctls.h \
|
||||
/usr/include/asm/ioctls.h /usr/include/asm-generic/ioctls.h \
|
||||
/usr/include/linux/ioctl.h /usr/include/asm/ioctl.h \
|
||||
/usr/include/asm-generic/ioctl.h /usr/include/bits/ioctl-types.h \
|
||||
/usr/include/sys/ttydefaults.h /usr/include/errno.h \
|
||||
/usr/include/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
|
||||
/usr/include/asm-generic/errno-base.h /usr/include/sys/socket.h \
|
||||
/usr/include/sys/uio.h /usr/include/bits/uio.h \
|
||||
/usr/include/bits/socket.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm-generic/socket.h \
|
||||
/usr/include/asm/sockios.h /usr/include/asm-generic/sockios.h \
|
||||
/usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wchar.h /usr/include/bits/in.h \
|
||||
/usr/include/arpa/inet.h ../../include/router.h ../../include/poll.h
|
||||
/usr/include/arpa/inet.h ../../include/router.h ../../include/poll.h \
|
||||
../../include/atomic.h ../../include/gw.h /usr/include/ctype.h \
|
||||
/usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
|
||||
/usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/bits/stat.h \
|
||||
/usr/include/unistd.h /usr/include/bits/posix_opt.h \
|
||||
/usr/include/bits/environments.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/syslog.h /usr/include/sys/syslog.h \
|
||||
/usr/include/bits/syslog-path.h /usr/include/pwd.h \
|
||||
/usr/include/sys/epoll.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/sys/ucontext.h \
|
||||
/usr/include/bits/sigthread.h \
|
||||
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stdbool.h \
|
||||
../../include/gateway_mysql.h ../../include/mysql_protocol.h \
|
||||
../../include/dcb.h
|
||||
|
@ -16,6 +16,7 @@
|
||||
* Copyright SkySQL Ab 2013
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dcb.h>
|
||||
#include <buffer.h>
|
||||
@ -28,6 +29,8 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <router.h>
|
||||
#include <poll.h>
|
||||
#include <atomic.h>
|
||||
#include <gw.h>
|
||||
|
||||
/**
|
||||
* @file telnetd.c - telnet daemon protocol module
|
||||
@ -185,6 +188,7 @@ telnetd_write(DCB *dcb, GWBUF *queue)
|
||||
static int
|
||||
telnetd_error(DCB *dcb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -195,6 +199,7 @@ telnetd_error(DCB *dcb)
|
||||
static int
|
||||
telnetd_hangup(DCB *dcb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,6 +257,7 @@ static int
|
||||
telnetd_close(DCB *dcb)
|
||||
{
|
||||
dcb_close(dcb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,11 +28,18 @@
|
||||
* number of connections by keeping a count for each server of how
|
||||
* many connections the query router has made to the server.
|
||||
*
|
||||
* When two servers have the same number of current connections the one with
|
||||
* the least number of connections since startup will be used.
|
||||
*
|
||||
* @verbatim
|
||||
* Revision History
|
||||
*
|
||||
* Date Who Description
|
||||
* 14/06/13 Mark Riddoch Initial implementation
|
||||
* 25/06/13 Mark Riddoch Addition of checks for current server state
|
||||
* 26/06/13 Mark Riddoch Use server with least connections since
|
||||
* startup if the number of current
|
||||
* connections is the same for two servers
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user