[ekiga] Fix crash in avahi when peer goes offline
- From: Eugen Dedu <ededu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Fix crash in avahi when peer goes offline
- Date: Thu, 10 Mar 2011 13:23:01 +0000 (UTC)
commit 3967fa2ec66f04d947afb8efd9a8d2c0c4b15255
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date: Thu Mar 10 14:19:54 2011 +0100
Fix crash in avahi when peer goes offline
Fixes bug #642282.
lib/engine/components/avahi/avahi-heap.cpp | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/lib/engine/components/avahi/avahi-heap.cpp b/lib/engine/components/avahi/avahi-heap.cpp
index b3d1747..825c725 100644
--- a/lib/engine/components/avahi/avahi-heap.cpp
+++ b/lib/engine/components/avahi/avahi-heap.cpp
@@ -231,19 +231,13 @@ Avahi::Heap::BrowserCallback (AvahiServiceBrowser *browser,
#if DEBUG
std::cout << __PRETTY_FUNCTION__ << " AVAHI_BROWSER_REMOVE" << std::endl;
#endif
- {
- bool found = false;
- for (iterator iter = begin ();
- !found && iter != end ();
- ++iter) {
-
- if ((*iter)->get_name () == name) {
-
- found = true;
- (*iter)->removed ();
- }
+ for (iterator iter = begin ();
+ iter != end ();
+ ++iter)
+ if ((*iter)->get_name () == name) {
+ (*iter)->removed ();
+ break;
}
- }
break;
case AVAHI_BROWSER_CACHE_EXHAUSTED:
// FIXME: do I care?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]