Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
5af46bdcd1
@ -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
|
||||
|
@ -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]");
|
||||
|
6
main.c
6
main.c
@ -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);
|
||||
}
|
||||
|
||||
|
2
tgl
2
tgl
@ -1 +1 @@
|
||||
Subproject commit 5a4e6b61839796e543d63900bb96e6325a9d9474
|
||||
Subproject commit 41121e9908fc5ddebe3ec6eca9f55172b630f21a
|
Loading…
Reference in New Issue
Block a user