pidgin/plugins/gevolution/eds-utils.c

branch
soc.2013.gobjectification.plugins
changeset 36773
62148e91059f
parent 36545
23b59a16c808
child 37049
02db93eb6506
equal deleted inserted replaced
36772:d728ec173fc5 36773:62148e91059f
175 ESourceList *addressbooks; 175 ESourceList *addressbooks;
176 GError *err = NULL; 176 GError *err = NULL;
177 EBookQuery *full_query; 177 EBookQuery *full_query;
178 GSList *groups, *g; 178 GSList *groups, *g;
179 EContact *result; 179 EContact *result;
180 EContactField protocol_field = gevo_protocol_get_field(buddy->account, buddy); 180 EContactField protocol_field = gevo_protocol_get_field(purple_buddy_get_account(buddy), buddy);
181 181
182 if (protocol_field == 0) 182 if (protocol_field == 0)
183 return NULL; 183 return NULL;
184 184
185 if (query != NULL) 185 if (query != NULL)
186 { 186 {
187 EBookQuery *queries[2]; 187 EBookQuery *queries[2];
188 188
189 queries[0] = query; 189 queries[0] = query;
190 queries[1] = e_book_query_field_test(protocol_field, E_BOOK_QUERY_IS, buddy->name); 190 queries[1] = e_book_query_field_test(protocol_field, E_BOOK_QUERY_IS, purple_buddy_get_name(buddy));
191 if (queries[1] == NULL) 191 if (queries[1] == NULL)
192 { 192 {
193 purple_debug_error("evolution", "Error in creating protocol query\n"); 193 purple_debug_error("evolution", "Error in creating protocol query\n");
194 e_book_query_unref(query); 194 e_book_query_unref(query);
195 return NULL; 195 return NULL;
197 197
198 full_query = e_book_query_and(2, queries, TRUE); 198 full_query = e_book_query_and(2, queries, TRUE);
199 } 199 }
200 else 200 else
201 { 201 {
202 full_query = e_book_query_field_test(protocol_field, E_BOOK_QUERY_IS, buddy->name); 202 full_query = e_book_query_field_test(protocol_field, E_BOOK_QUERY_IS, purple_buddy_get_name(buddy));
203 if (full_query == NULL) 203 if (full_query == NULL)
204 { 204 {
205 purple_debug_error("evolution", "Error in creating protocol query\n"); 205 purple_debug_error("evolution", "Error in creating protocol query\n");
206 return NULL; 206 return NULL;
207 } 207 }

mercurial