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
5af46bdc
Commit
5af46bdc
authored
Jun 02, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master'
parents
ff704275
77cfd51d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
README.md
README.md
+1
-0
interface.c
interface.c
+4
-3
main.c
main.c
+4
-2
tgl
tgl
+1
-1
No files found.
README.md
View file @
5af46bdc
...
...
@@ -75,6 +75,7 @@ If using [Homebrew](http://brew.sh/):
brew install lua
brew install python
brew install libevent
brew install jansson
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
...
...
interface.c
View file @
5af46bdc
...
...
@@ -165,7 +165,7 @@ void socket_answer_add_printf (const char *format, ...) {
}
void
socket_answer_end
(
struct
in_ev
*
ev
)
{
if
(
ev
->
bev
&&
socket_answer_pos
>
0
)
{
if
(
ev
->
bev
)
{
static
char
s
[
100
];
sprintf
(
s
,
"ANSWER %d
\n
"
,
socket_answer_pos
);
bufferevent_write
(
ev
->
bev
,
s
,
strlen
(
s
));
...
...
@@ -3061,8 +3061,9 @@ void print_media (struct in_ev *ev, struct tgl_message_media *M) {
case
tgl_message_media_none
:
return
;
case
tgl_message_media_photo
:
assert
(
M
->
photo
);
if
(
M
->
photo
->
caption
&&
strlen
(
M
->
photo
->
caption
))
{
if
(
!
M
->
photo
)
{
mprintf
(
ev
,
"[photo bad]"
);
}
else
if
(
M
->
photo
->
caption
&&
strlen
(
M
->
photo
->
caption
))
{
mprintf
(
ev
,
"[photo %s]"
,
M
->
photo
->
caption
);
}
else
{
mprintf
(
ev
,
"[photo]"
);
...
...
main.c
View file @
5af46bdc
...
...
@@ -860,10 +860,12 @@ void do_halt (int error) {
close
(
sfd
);
}
if
(
exit_code
)
if
(
exit_code
)
{
retval
=
exit_code
;
else
}
else
{
retval
=
error
?
EXIT_FAILURE
:
EXIT_SUCCESS
;
}
exit
(
retval
);
}
...
...
tgl
@
41121e99
Subproject commit
5a4e6b61839796e543d63900bb96e6325a9d9474
Subproject commit
41121e9908fc5ddebe3ec6eca9f55172b630f21a
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