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
723416d3
Commit
723416d3
authored
Jan 12, 2015
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipv6 support
parent
f59c2a84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
loop.c
loop.c
+4
-0
main.c
main.c
+6
-1
tgl
tgl
+1
-1
No files found.
loop.c
View file @
723416d3
...
@@ -97,6 +97,7 @@ extern volatile int sigterm_cnt;
...
@@ -97,6 +97,7 @@ extern volatile int sigterm_cnt;
extern
char
*
start_command
;
extern
char
*
start_command
;
extern
struct
tgl_state
*
TLS
;
extern
struct
tgl_state
*
TLS
;
extern
int
ipv6_enabled
;
struct
event
*
term_ev
=
0
;
struct
event
*
term_ev
=
0
;
int
read_one_string
;
int
read_one_string
;
...
@@ -675,6 +676,9 @@ int loop (void) {
...
@@ -675,6 +676,9 @@ int loop (void) {
tgl_set_download_directory
(
TLS
,
get_downloads_directory
());
tgl_set_download_directory
(
TLS
,
get_downloads_directory
());
tgl_register_app_id
(
TLS
,
TELEGRAM_CLI_APP_ID
,
TELEGRAM_CLI_APP_HASH
);
tgl_register_app_id
(
TLS
,
TELEGRAM_CLI_APP_ID
,
TELEGRAM_CLI_APP_HASH
);
tgl_set_app_version
(
TLS
,
"Telegram-cli "
TELEGRAM_CLI_VERSION
);
tgl_set_app_version
(
TLS
,
"Telegram-cli "
TELEGRAM_CLI_VERSION
);
if
(
ipv6_enabled
)
{
tgl_enable_ipv6
(
TLS
);
}
tgl_init
(
TLS
);
tgl_init
(
TLS
);
if
(
binlog_enabled
)
{
if
(
binlog_enabled
)
{
...
...
main.c
View file @
723416d3
...
@@ -116,6 +116,7 @@ int disable_output;
...
@@ -116,6 +116,7 @@ int disable_output;
int
reset_authorization
;
int
reset_authorization
;
int
port
;
int
port
;
int
use_ids
;
int
use_ids
;
int
ipv6_enabled
;
char
*
start_command
;
char
*
start_command
;
struct
tgl_state
*
TLS
;
struct
tgl_state
*
TLS
;
...
@@ -473,6 +474,7 @@ void usage (void) {
...
@@ -473,6 +474,7 @@ void usage (void) {
printf
(
" -S <socket-name> unix socket to create
\n
"
);
printf
(
" -S <socket-name> unix socket to create
\n
"
);
printf
(
" -e <commands> make commands end exit
\n
"
);
printf
(
" -e <commands> make commands end exit
\n
"
);
printf
(
" -I use user and chat IDs in updates instead of names
\n
"
);
printf
(
" -I use user and chat IDs in updates instead of names
\n
"
);
printf
(
" -6 use ipv6 (may be unstable)
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
...
@@ -576,7 +578,7 @@ char *unix_socket;
...
@@ -576,7 +578,7 @@ char *unix_socket;
void
args_parse
(
int
argc
,
char
**
argv
)
{
void
args_parse
(
int
argc
,
char
**
argv
)
{
TLS
=
tgl_state_alloc
();
TLS
=
tgl_state_alloc
();
int
opt
=
0
;
int
opt
=
0
;
while
((
opt
=
getopt
(
argc
,
argv
,
"u:hk:vNl:fEwWCRdL:DU:G:qP:S:e:I"
while
((
opt
=
getopt
(
argc
,
argv
,
"u:hk:vNl:fEwWCRdL:DU:G:qP:S:e:I
6
"
#ifdef HAVE_LIBCONFIG
#ifdef HAVE_LIBCONFIG
"c:p:"
"c:p:"
#else
#else
...
@@ -671,6 +673,9 @@ void args_parse (int argc, char **argv) {
...
@@ -671,6 +673,9 @@ void args_parse (int argc, char **argv) {
case
'I'
:
case
'I'
:
use_ids
++
;
use_ids
++
;
break
;
break
;
case
'6'
:
ipv6_enabled
=
1
;
break
;
case
'h'
:
case
'h'
:
default:
default:
usage
();
usage
();
...
...
tgl
@
354f2064
Subproject commit
7f370266688aed5329ea576e9795bb27e74b2bfe
Subproject commit
354f2064fcb1dd9de1e1abdb091daf532d735b4a
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