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
e63e0ff1
Commit
e63e0ff1
authored
14 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#3854] Removed addressbook's remaining search_id (preventing some displays)
parent
9e78fcdb
Branches
Branches containing commit
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/contacts/addressbook.c
+0
-1
0 additions, 1 deletion
sflphone-client-gnome/src/contacts/addressbook.c
sflphone-client-gnome/src/contacts/addressbook/eds.c
+4
-40
4 additions, 40 deletions
sflphone-client-gnome/src/contacts/addressbook/eds.c
with
4 additions
and
41 deletions
sflphone-client-gnome/src/contacts/addressbook.c
+
0
−
1
View file @
e63e0ff1
...
...
@@ -180,7 +180,6 @@ handler_async_search (GList *hits, gpointer user_data)
calllist_reset
(
contacts
);
for
(
i
=
hits
;
i
!=
NULL
;
i
=
i
->
next
)
{
DEBUG
(
"while"
);
Hit
*
entry
;
entry
=
i
->
data
;
...
...
This diff is collapsed.
Click to expand it.
sflphone-client-gnome/src/contacts/addressbook/eds.c
+
4
−
40
View file @
e63e0ff1
...
...
@@ -46,7 +46,6 @@
* Structure used to store search callback and data
*/
typedef
struct
_Search_Handler_And_Data
{
int
search_id
;
SearchAsyncHandler
search_handler
;
OpenAsyncHandler
open_handler
;
gpointer
user_data
;
...
...
@@ -56,13 +55,6 @@ typedef struct _Search_Handler_And_Data {
EBookQuery
*
equery
;
}
Search_Handler_And_Data
;
/**
* Structure used to store open callback and data
*/
typedef
struct
_Open_Handler_And_Data
{
OpenAsyncHandler
handler
;
}
Open_Handler_And_Data
;
/**
* Size of image that will be displayed in contact list
*/
...
...
@@ -230,12 +222,10 @@ pixbuf_from_contact (EContact *contact)
static
void
view_finish_callback
(
EBookView
*
book_view
,
Search_Handler_And_Data
*
had
)
{
GList
*
i
;
SearchAsyncHandler
had_handler
=
had
->
search_handler
;
GList
*
had_hits
=
had
->
hits
;
gpointer
had_user_data
=
had
->
user_data
;
int
search_id
=
had
->
search_id
;
g_free
(
had
);
DEBUG
(
"Addressbook: View finish"
);
...
...
@@ -243,24 +233,8 @@ view_finish_callback (EBookView *book_view, Search_Handler_And_Data *had)
if
(
book_view
!=
NULL
)
g_object_unref
(
book_view
);
if
(
search_id
==
current_search_id
)
{
// Reinitialize search id to prevent overflow
if
(
current_search_id
>
5000
)
current_search_id
=
0
;
// Call display callback
had_handler
(
had_hits
,
had_user_data
);
}
else
{
// Some hits could have been processed but will not be used
for
(
i
=
had_hits
;
i
!=
NULL
;
i
=
i
->
next
)
{
Hit
*
entry
;
entry
=
i
->
data
;
free_hit
(
entry
);
}
g_list_free
(
had_hits
);
}
// Call display callback
had_handler
(
had_hits
,
had_user_data
);
}
...
...
@@ -562,12 +536,8 @@ void
search_async_by_contacts
(
const
char
*
query
,
int
max_results
,
SearchAsyncHandler
handler
,
gpointer
user_data
)
{
GError
*
err
=
NULL
;
// ESourceList *source_list = NULL;
// ESource *source = NULL;
current_search_id
++
;
DEBUG
(
"Addressbook: New search by contacts
%d
: %s, max_results %d"
,
current_search_id
,
query
,
max_results
);
DEBUG
(
"Addressbook: New search by contacts: %s, max_results %d"
,
query
,
max_results
);
if
(
strlen
(
query
)
<
1
)
{
DEBUG
(
"Addressbook: Query is empty"
);
...
...
@@ -578,7 +548,6 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
Search_Handler_And_Data
*
had
=
g_new
(
Search_Handler_And_Data
,
1
);
// initialize search data
had
->
search_id
=
current_search_id
;
had
->
search_handler
=
handler
;
had
->
user_data
=
user_data
;
had
->
hits
=
NULL
;
...
...
@@ -590,13 +559,8 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
ERROR
(
"Addressbook: Error: Current addressbook uri not specified uri"
);
// source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
// source = e_source_list_peek_source_by_uid (source_list, current_uid);
DEBUG
(
"Addressbook: Opening addressbook: %s"
,
current_uri
);
EBook
*
book
=
e_book_new_from_uri
(
current_uri
,
&
err
);
// EBook *book = e_book_new_from_uri ("ldap://officesrv-01:389/ou=Contacts,dc=savoirfairelinux,dc=net??sub?(objectClass=*)", &err);
// EBook *book = e_book_new (source, &err);
if
(
err
)
ERROR
(
"Addressbook: Error: Could not open new book: %s"
,
err
->
message
);
...
...
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