Merge github.com:vysheng/tg

This commit is contained in:
vvaltman 2014-11-09 16:20:02 +03:00
commit 824804be51
3 changed files with 7 additions and 5 deletions

View File

@ -74,8 +74,8 @@ If using [Homebrew](http://brew.sh/):
brew install libconfig
brew install readline
brew install lua
export CFLAGS="-I/usr/local/include -I/usr/local/Cellar/readline/6.2.4/include"
export LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/readline/6.2.4/lib"
export CFLAGS="-I/usr/local/include -I/usr/local/Cellar/readline/6.3.8/include"
export LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/readline/6.3.8/lib"
./configure && make
Thanks to [@jfontan](https://github.com/vysheng/tg/issues/3#issuecomment-28293731) for this solution.
@ -85,8 +85,9 @@ If using [MacPorts](https://www.macports.org):
sudo port install libconfig-hr
sudo port install readline
sudo port install lua51
export CFLAGS="-I/usr/local/include -I/opt/local/include"
export LDFLAGS="-L/usr/local/lib -L/opt/local/lib/"
sudo port install libevent
export CFLAGS="-I/usr/local/include -I/opt/local/include -I/opt/local/include/lua-5.1"
export LDFLAGS="-L/usr/local/lib -L/opt/local/lib -L/opt/local/lib/lua-5.1"
./configure && make
Install these ports:

2
loop.c
View File

@ -683,7 +683,7 @@ static void event_incoming (struct bufferevent *bev, short what, void *_arg) {
static void accept_incoming (evutil_socket_t efd, short what, void *arg) {
vlogprintf (E_WARNING, "Accepting incoming connection\n");
unsigned clilen;
unsigned clilen = 0;
struct sockaddr_in cli_addr;
int fd = accept (efd, (struct sockaddr *)&cli_addr, &clilen);

1
tgl.h
View File

@ -22,6 +22,7 @@
#include <tgl-layout.h>
#include <string.h>
#include <stdlib.h>
#define TGL_MAX_DC_NUM 100
#define TG_SERVER_1 "173.240.5.1"