ekiga r7654 - in trunk: . lib/engine/components/local-roster src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7654 - in trunk: . lib/engine/components/local-roster src/gui
- Date: Wed, 11 Feb 2009 21:04:08 +0000 (UTC)
Author: dsandras
Date: Wed Feb 11 21:04:08 2009
New Revision: 7654
URL: http://svn.gnome.org/viewvc/ekiga?rev=7654&view=rev
Log:
Do not allow whitespaces in uris. Fixes bug report #568240.
Modified:
trunk/ChangeLog
trunk/lib/engine/components/local-roster/local-heap.cpp
trunk/lib/engine/components/local-roster/local-presentity.cpp
trunk/src/gui/main.cpp
Modified: trunk/lib/engine/components/local-roster/local-heap.cpp
==============================================================================
--- trunk/lib/engine/components/local-roster/local-heap.cpp (original)
+++ trunk/lib/engine/components/local-roster/local-heap.cpp Wed Feb 11 21:04:08 2009
@@ -33,6 +33,7 @@
*
*/
+#include <algorithm>
#include <iostream>
#include <set>
#include <glib/gi18n.h>
@@ -317,6 +318,7 @@
else
uri = result.text ("uri");
+ uri.erase (std::remove (uri.begin(), uri.end(), ' '));
if (presence_core->is_supported_uri (uri)
&& !has_presentity_with_uri (uri)) {
Modified: trunk/lib/engine/components/local-roster/local-presentity.cpp
==============================================================================
--- trunk/lib/engine/components/local-roster/local-presentity.cpp (original)
+++ trunk/lib/engine/components/local-roster/local-presentity.cpp Wed Feb 11 21:04:08 2009
@@ -250,9 +250,10 @@
/* we first fetch all data before making any change, so if there's
* a problem, we don't do anything */
const std::string new_name = result.text ("name");
- const std::string new_uri = result.text ("uri");
const std::set<std::string> new_groups = result.editable_set ("groups");
+ std::string new_uri = result.text ("uri");
std::map<std::string, xmlNodePtr> future_group_nodes;
+ new_uri.erase (std::remove (new_uri.begin(), new_uri.end(), ' '));
name = new_name;
if (uri != new_uri) {
Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp (original)
+++ trunk/src/gui/main.cpp Wed Feb 11 21:04:08 2009
@@ -104,6 +104,8 @@
#include "services.h"
#include "form-dialog-gtk.h"
+#include <algorithm>
+
enum CallingState {Standby, Calling, Connected, Called};
enum DeviceType { AudioInput, AudioOutput, VideoInput} ;
@@ -1470,6 +1472,7 @@
uri = uri + "@" + (*it);
ekiga_main_window_set_call_url (mw, uri.c_str ());
}
+ uri.erase (std::remove (uri.begin(), uri.end(), ' '));
if (call_core->dial (uri)) {
pos = uri.find ("@");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]