Vadim Lebedev wrote:
Ralf Schlatterbeck wrote:
On Tue, Feb 26, 2008 at 02:48:04PM +0100, Vadim Lebedev wrote:
No revert is the wrong thing...
Maybe hg udpate 0

Ok that did it -- revert seems to do the same but deletes local changes.

I've built r0 and still don't get presence with ekiga.net. So either
they changed something or I'm missing something (and, yes, I've enabled
SIMPLE in the config dialog). So this doesn't seem to be a regression in
later versions. The fact remainst that I'm still not able to get p2p
presence working (tried both, ekiga.net and the phone provider we're
testing with).

With the following patch I'm able to chat via ekiga.net although
wengophone thinks my party (myself :-) isn't connected (you'll want to
remove my debug output and tie the behaviour of hasIM to a config
option) the idea of the patch is to make getPreferred always return the
best contact it finds, even if the peer is offline:


Ah...  This is EXACTLY what this ghatWithoutPrsence stuff is....
Activate Chat without PRESENCE mechanics functionning....

Vadim


diff -r d4660b5e36fb wengophone/src/model/contactlist/ContactProfile.cpp
--- a/wengophone/src/model/contactlist/ContactProfile.cpp       Mon Feb 18 
15:44:08 2008 +0100
+++ b/wengophone/src/model/contactlist/ContactProfile.cpp       Mon Feb 11 
13:14:58 2008 +0100
@@ -136,6 +136,7 @@ void ContactProfile::setGroupId(const st
 }
bool ContactProfile::hasIM() const {
+        return true;
        return (getPresenceState() != EnumPresenceState::PresenceStateOffline &&
getPresenceState() != EnumPresenceState::PresenceStateUnknown && getPresenceState() != EnumPresenceState::PresenceStateUnavailable);
@@ -218,9 +219,9 @@ IMContact * ContactProfile::getPreferred
        const int offlineScore = 
getStateScore(EnumPresenceState::PresenceStateOffline);
IMContact * bestIMContact = 0;
-       int bestIMContactScore = 0;
+       int bestIMContactScore = -1;
        IMContact * bestWengoContact = 0;
-       int bestWengoContactScore = 0;
+       int bestWengoContactScore = -1;
// Find best IM contact and best Wengo contact
        IMContactSet::const_iterator
@@ -231,9 +232,11 @@ IMContact * ContactProfile::getPreferred
                EnumPresenceState::PresenceState state = it->getPresenceState();
                int contactScore = getStateScore(state);
+ # if 0
                if (contactScore <= offlineScore) {
                        continue;
                }
+                # endif
IMContact* contact = const_cast<IMContact*>( &(*it) ); @@ -248,6 +251,7 @@ IMContact * ContactProfile::getPreferred
                                bestIMContactScore = contactScore;
                        }
                }
+                LOG_WARN("Iterating...%d %d %d", contactScore, offlineScore, 
bestIMContactScore);
        }
// Get score of _preferredIMContact, if any
@@ -255,7 +259,7 @@ IMContact * ContactProfile::getPreferred
        if (_preferredIMContact) {
                preferredIMContactScore = 
getStateScore(_preferredIMContact->getPresenceState());
        } else {
-               preferredIMContactScore = 0;
+               preferredIMContactScore = -1;
        }
// Choose the best one

Ralf

------------------------------------------------------------------------

_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel
I've just commit fix to syntax error you mentionned before.
Try the latest version whule activaiting sip.chat.without.prsenece advanced config option

Vadim
_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to