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
0e2db10a
Commit
0e2db10a
authored
May 01, 2015
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added key to disable link previews
parent
ba1988b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
loop.c
loop.c
+4
-0
main.c
main.c
+6
-0
tgl
tgl
+1
-1
No files found.
loop.c
View file @
0e2db10a
...
...
@@ -108,6 +108,7 @@ void (*on_string_cb)(struct tgl_state *TLS, char *str, void *arg);
void
*
string_cb_arg
;
char
*
one_string_prompt
;
int
one_string_flags
;
extern
int
disable_link_preview
;
void
deactivate_readline
(
void
);
void
reactivate_readline
(
void
);
...
...
@@ -683,6 +684,9 @@ int loop (void) {
if
(
ipv6_enabled
)
{
tgl_enable_ipv6
(
TLS
);
}
if
(
disable_link_preview
)
{
tgl_disable_link_preview
(
TLS
);
}
tgl_init
(
TLS
);
if
(
binlog_enabled
)
{
...
...
main.c
View file @
0e2db10a
...
...
@@ -119,6 +119,7 @@ int port;
int
use_ids
;
int
ipv6_enabled
;
char
*
start_command
;
int
disable_link_preview
;
struct
tgl_state
*
TLS
;
...
...
@@ -478,6 +479,7 @@ void usage (void) {
printf
(
" --enable-ipv6/-6 use ipv6 (may be unstable)
\n
"
);
printf
(
" --help/-h prints this help
\n
"
);
printf
(
" --accept-any-tcp accepts tcp connections from any src (only loopback by default)
\n
"
);
printf
(
" --disable-link-preview disables server-side previews to links
\n
"
);
exit
(
1
);
}
...
...
@@ -622,6 +624,7 @@ void args_parse (int argc, char **argv) {
{
"enable-ipv6"
,
no_argument
,
0
,
'6'
},
{
"help"
,
no_argument
,
0
,
'h'
},
{
"accept-any-tcp"
,
no_argument
,
0
,
1001
},
{
"disable-link-preview"
,
no_argument
,
0
,
1002
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -732,6 +735,9 @@ void args_parse (int argc, char **argv) {
case
'6'
:
ipv6_enabled
=
1
;
break
;
case
1002
:
disable_link_preview
=
2
;
break
;
case
'h'
:
default:
usage
();
...
...
tgl
@
6e014b76
Subproject commit
0f76784c972feb7824a40d1c33dde898fbeced63
Subproject commit
6e014b76a256ba8ea88f24a3624e1e3a51adfb66
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