disco#info to the server
Piers Harding
piers at ompka.net
Wed Jul 25 18:41:59 UTC 2007
Cool -
I think it is backed up by http://www.xmpp.org/extensions/xep-0030.html
- although I'm not 100% sure that the fix is in the right place?
Perhaps a commiter could take a look at it?
Thanks,
Piers Harding.
On Wed, Jul 25, 2007 at 12:08:36PM -0400, Edward Rudd wrote:
> SWEEET!!!!!
>
> I've been trying to figure out what was different between djabberd and
> jabberd14 in terms of service discovery. since psi would correctly
> detect the MUC service but Pidgin would not. And the "from" was
> Exactly it.
>
> I just applied this to my copy and verified it fixes that issue. Thanks
> Piers!.
>
> Here is an SVN diff from Trunk.
>
>
> Index: DJabberd/IQ.pm
> ===================================================================
> --- DJabberd/IQ.pm (revision 758)
> +++ DJabberd/IQ.pm (working copy)
> @@ -102,8 +102,10 @@
> $raw ||= "";
> my $id = $self->id;
> my $bj = $conn->bound_jid;
> + my $from_jid = $self->to;
> my $to = $bj ? ("to='" . $bj->as_string_exml . "'") : "";
> - my $xml = qq{<iq $to type='$type' id='$id'>$raw</iq>};
> + my $from = $from_jid ? ("from='".$from_jid."'") : "";
> + my $xml = qq{<iq $to $from type='$type' id='$id'>$raw</iq>};
> $conn->xmllog->info($xml);
> $conn->write(\$xml);
> }
>
>
> Piers Harding wrote:
> > Hi -
> >
> > I was wondering if others had seen a problem with some clients when
> > doing service discovery.
> >
> > I have noticed that when an iq eg:
> > <iq type='get' id='99' from='piers at gecko.local.net/Gajim'
> > to='gecko.local.net'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>
> >
> > is sent from Gajim or Psi and a result comes back:
> > <iq to='piers at gecko.local.net/Gajim' type='result' id='99'>
> > <query xmlns='http://jabber.org/protocol/disco#info'>
> > <identity category='server' type='im' name='djabberd'/>
> > <feature var='http://jabber.org/protocol/disco#info'/>
> > <feature var='urn:xmpp:ping'/>
> > <feature var='vcard-temp'/>
> > <feature var='jabber:iq:version'/>
> > </query>
> > </iq>
> >
> > The client does not process the return. If I do the same test with
> > jabber.org which is running ejabberd, I can see that the result is
> > stamped with a from jid - eg:
> > <iq id="30" type="result" to='piers at ompka.net/Gajim' from='jabber.org'>
> > <query xmlns='http://jabber.org/protocol/disco#items'>
> > ....
> >
> >
> > If I modify DJabberd::IQ ->
> > sub send_reply {
> > my DJabberd::IQ $self = shift;
> > my ($type, $raw) = @_;
> >
> > my $conn = $self->{connection}
> > or return;
> >
> > $raw ||= "";
> > my $id = $self->id;
> > my $bj = $conn->bound_jid;
> > my $from_jid = $self->to;
> > my $to = $bj ? ("to='" . $bj->as_string_exml . "'") : "";
> > my $from = $from_jid ? ("from='" . $from_jid . "'") : "";
> > my $xml = qq{<iq $to $from type='$type' id='$id'>$raw</iq>};
> > $conn->xmllog->info($xml);
> > $conn->write(\$xml);
> > }
> >
> > So that it is stamped with a from address, then djabberd exhibits the
> > same behaviour.
> >
> > Is this correct or is it a case of the client being broken?
> >
> > Thanks,
> > Piers Harding.
> >
> >
> begin:vcard
> fn:Edward Rudd
> n:Rudd;Edward
> org:Netfor, Inc.;Development
> adr;dom:;;11810 Technology Lane;Fishers;IN;46038
> email;internet:erudd at netfor.com
> title:Lead Programmer
> tel;work:317-813-4500 x 231
> x-mozilla-html:FALSE
> url:http://www.netfor.com/
> version:2.1
> end:vcard
>
--
Home - http://www.piersharding.com
xmpp:piers at ompka.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/djabberd/attachments/20070725/2c09b5e3/attachment.pgp
More information about the Djabberd
mailing list