Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
86352f29
Commit
86352f29
authored
Apr 30, 2015
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated tgl
parent
3dedb4ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
main.c
main.c
+7
-1
tgl
tgl
+1
-1
No files found.
main.c
View file @
86352f29
...
@@ -477,6 +477,7 @@ void usage (void) {
...
@@ -477,6 +477,7 @@ void usage (void) {
printf
(
" --disable-names/-I use user and chat IDs in updates instead of names
\n
"
);
printf
(
" --disable-names/-I use user and chat IDs in updates instead of names
\n
"
);
printf
(
" --enable-ipv6/-6 use ipv6 (may be unstable)
\n
"
);
printf
(
" --enable-ipv6/-6 use ipv6 (may be unstable)
\n
"
);
printf
(
" --help/-h prints this help
\n
"
);
printf
(
" --help/-h prints this help
\n
"
);
printf
(
" --accept-any-tcp accepts tcp connections from any src (only loopback by default)
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
...
@@ -533,6 +534,7 @@ static void sighup_handler (const int sig) {
...
@@ -533,6 +534,7 @@ static void sighup_handler (const int sig) {
char
*
set_user_name
;
char
*
set_user_name
;
char
*
set_group_name
;
char
*
set_group_name
;
int
accept_any_tcp
;
int
change_user_group
()
{
int
change_user_group
()
{
char
*
username
=
set_user_name
;
char
*
username
=
set_user_name
;
...
@@ -619,6 +621,7 @@ void args_parse (int argc, char **argv) {
...
@@ -619,6 +621,7 @@ void args_parse (int argc, char **argv) {
{
"disable-names"
,
no_argument
,
0
,
'I'
},
{
"disable-names"
,
no_argument
,
0
,
'I'
},
{
"enable-ipv6"
,
no_argument
,
0
,
'6'
},
{
"enable-ipv6"
,
no_argument
,
0
,
'6'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
"accept-any-tcp"
,
no_argument
,
0
,
1001
},
{
0
,
0
,
0
,
0
}
{
0
,
0
,
0
,
0
}
};
};
...
@@ -640,6 +643,9 @@ void args_parse (int argc, char **argv) {
...
@@ -640,6 +643,9 @@ void args_parse (int argc, char **argv) {
case
1000
:
case
1000
:
tgl_allocator
=
&
tgl_allocator_debug
;
tgl_allocator
=
&
tgl_allocator_debug
;
break
;
break
;
case
1001
:
accept_any_tcp
=
1
;
break
;
case
'u'
:
case
'u'
:
set_default_username
(
optarg
);
set_default_username
(
optarg
);
break
;
break
;
...
@@ -851,7 +857,7 @@ int main (int argc, char **argv) {
...
@@ -851,7 +857,7 @@ int main (int argc, char **argv) {
memset
(
&
serv_addr
,
0
,
sizeof
(
serv_addr
));
memset
(
&
serv_addr
,
0
,
sizeof
(
serv_addr
));
serv_addr
.
sin_family
=
AF_INET
;
serv_addr
.
sin_family
=
AF_INET
;
serv_addr
.
sin_addr
.
s_addr
=
htonl
(
0x7f000001
);
serv_addr
.
sin_addr
.
s_addr
=
accept_any_tcp
?
INADDR_ANY
:
htonl
(
0x7f000001
);
serv_addr
.
sin_port
=
htons
(
port
);
serv_addr
.
sin_port
=
htons
(
port
);
if
(
bind
(
sfd
,
(
struct
sockaddr
*
)
&
serv_addr
,
sizeof
(
serv_addr
))
<
0
)
{
if
(
bind
(
sfd
,
(
struct
sockaddr
*
)
&
serv_addr
,
sizeof
(
serv_addr
))
<
0
)
{
...
...
tgl
@
c97540cd
Subproject commit
03f46aea574f8628ba869192505b7fe76cceccf
c
Subproject commit
c97540cd8e82e48d337f602b09f8ac3c7b52558
c
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment