Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
1c0e9668
Commit
1c0e9668
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
* #6392: remove generate_call_id() used only once
inline the only use case and fix a memory leak bug found by cppcheck
parent
370f09be
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-client-gnome/src/callable_obj.c
+6
-14
6 additions, 14 deletions
sflphone-client-gnome/src/callable_obj.c
sflphone-client-gnome/src/callable_obj.h
+0
-5
0 additions, 5 deletions
sflphone-client-gnome/src/callable_obj.h
with
6 additions
and
19 deletions
sflphone-client-gnome/src/callable_obj.c
+
6
−
14
View file @
1c0e9668
...
...
@@ -214,7 +214,6 @@ void create_new_call (callable_type_t type, call_state_t state, gchar* callID ,
GError
*
err1
=
NULL
;
callable_obj_t
*
obj
;
gchar
*
call_id
;
DEBUG
(
"CallableObj: Create new call"
);
...
...
@@ -243,12 +242,14 @@ void create_new_call (callable_type_t type, call_state_t state, gchar* callID ,
set_timestamp
(
&
(
obj
->
_time_stop
));
if
(
g_strcasecmp
(
callID
,
""
)
==
0
)
call_id
=
generate_call_id
();
{
obj
->
_callID
=
g_new0
(
gchar
,
30
);
if
(
obj
->
_callID
)
g_sprintf
(
obj
->
_callID
,
"%d"
,
rand
());
}
else
call_id
=
callID
;
obj
->
_callID
=
g_strdup
(
callID
)
;
// Set the IDs
obj
->
_callID
=
g_strdup
(
call_id
);
obj
->
clockStarted
=
1
;
if
(
obj
->
_type
==
CALL
)
{
...
...
@@ -397,15 +398,6 @@ void attach_thumbnail (callable_obj_t *call, GdkPixbuf *pixbuf)
call
->
_contact_thumbnail
=
pixbuf
;
}
gchar
*
generate_call_id
(
void
)
{
gchar
*
call_id
;
call_id
=
g_new0
(
gchar
,
30
);
g_sprintf
(
call_id
,
"%d"
,
rand
());
return
call_id
;
}
gchar
*
get_peer_info
(
gchar
*
number
,
gchar
*
name
)
{
gchar
*
info
;
...
...
This diff is collapsed.
Click to expand it.
sflphone-client-gnome/src/callable_obj.h
+
0
−
5
View file @
1c0e9668
...
...
@@ -222,11 +222,6 @@ free_callable_obj_t (callable_obj_t *c);
void
stop_call_clock
(
callable_obj_t
*
c
);
/**
* @return gchar* A random ID
*/
gchar
*
generate_call_id
(
void
);
gchar
*
get_peer_info
(
gchar
*
,
gchar
*
);
history_state_t
get_history_state_from_id
(
gchar
*
indice
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment