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
52125223
Commit
52125223
authored
Sep 21, 2014
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes in refcnt
parent
091b0608
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
interface.c
interface.c
+13
-2
No files found.
interface.c
View file @
52125223
...
...
@@ -1735,8 +1735,12 @@ void secret_chat_update_gw (struct tgl_secret_chat *U, unsigned flags) {
}
void
print_card_gw
(
void
*
extra
,
int
success
,
int
size
,
int
*
card
)
{
assert
(
success
);
struct
in_ev
*
ev
=
extra
;
if
(
ev
&&
!--
ev
->
refcnt
)
{
free
(
ev
);
return
;
}
if
(
!
success
)
{
return
;
}
mprint_start
(
ev
);
mprintf
(
ev
,
"Card: "
);
int
i
;
...
...
@@ -1748,6 +1752,11 @@ void print_card_gw (void *extra, int success, int size, int *card) {
void
callback_extf
(
void
*
extra
,
int
success
,
char
*
buf
)
{
struct
in_ev
*
ev
=
extra
;
if
(
ev
&&
!--
ev
->
refcnt
)
{
free
(
ev
);
return
;
}
if
(
!
success
)
{
return
;
}
mprint_start
(
ev
);
mprintf
(
ev
,
"%s
\n
"
,
buf
);
mprint_end
(
ev
);
...
...
@@ -1794,7 +1803,9 @@ void interpreter_ex (char *line UU, void *ex) {
}
if
(
*
line
==
'('
)
{
tgl_do_send_extf
(
line
,
strlen
(
line
),
callback_extf
,
ex
);
struct
in_ev
*
ev
=
ex
;
if
(
ev
)
{
ev
->
refcnt
++
;
}
tgl_do_send_extf
(
line
,
strlen
(
line
),
callback_extf
,
ev
);
in_readline
=
0
;
return
;
}
...
...
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