ekiga r6256 - trunk/lib/engine/components/avahi-publisher
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6256 - trunk/lib/engine/components/avahi-publisher
- Date: Sat, 17 May 2008 18:33:18 +0000 (UTC)
Author: dsandras
Date: Sat May 17 18:33:17 2008
New Revision: 6256
URL: http://svn.gnome.org/viewvc/ekiga?rev=6256&view=rev
Log:
Fixed crash. Thanks Fabrice for testing.
Modified:
trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp
trunk/lib/engine/components/avahi-publisher/avahi-publisher.h
Modified: trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp
==============================================================================
--- trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp (original)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp Sat May 17 18:33:17 2008
@@ -162,12 +162,8 @@
to_publish.clear ();
Ekiga::CallCore::const_iterator it;
- for (it = call_core->begin (); it != call_core->end (); it++) {
-
- const Ekiga::CallManager::Interface & interface = (*it)->get_interface ();
- const std::string & protocol = (*it)->get_protocol_name ();
- to_publish [protocol] = interface;
- }
+ for (it = call_core->begin (); it != call_core->end (); it++)
+ to_publish = (*it)->get_interfaces ();
}
name = g_strdup (details.get_display_name ().c_str ());
@@ -188,7 +184,8 @@
if (name) {
client = avahi_client_new (poll_api, (AvahiClientFlags) 0, avahi_client_callback, this, &error);
- group = avahi_entry_group_new (client, avahi_entry_group_callback, this);
+ if (client)
+ group = avahi_entry_group_new (client, avahi_entry_group_callback, this);
}
}
}
@@ -201,11 +198,11 @@
if (group != NULL) {
- std::map<std::string, Ekiga::CallManager::Interface>::const_iterator it;
+ Ekiga::CallManager::InterfaceList::const_iterator it;
for (it = to_publish.begin (); it != to_publish.end (); it++) {
std::stringstream srv;
- srv << "_" << (*it).first << "._" << (*it).second.protocol;
+ srv << "_" << (*it).voip_protocol << "._" << (*it).protocol;
ret = avahi_entry_group_add_service_strlst (group,
AVAHI_IF_UNSPEC,
@@ -215,7 +212,7 @@
srv.str ().c_str (),
NULL,
NULL,
- (*it).second.port,
+ (*it).port,
text_record);
if (ret >= 0) {
@@ -224,8 +221,9 @@
if (ret < 0)
success = false;
}
- else
+ else {
success = false;
+ }
}
}
Modified: trunk/lib/engine/components/avahi-publisher/avahi-publisher.h
==============================================================================
--- trunk/lib/engine/components/avahi-publisher/avahi-publisher.h (original)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher.h Sat May 17 18:33:17 2008
@@ -99,7 +99,7 @@
AvahiGLibPoll *glib_poll;
const AvahiPoll *poll_api;
- std::map<std::string, Ekiga::CallManager::Interface> to_publish;
+ Ekiga::CallManager::InterfaceList to_publish;
};
};
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]