[djabberd] kane, r781: r6512@coke: josboum | 2008-07-27 01:07...

Brad Fitzpatrick brad at danga.com
Mon Jul 28 00:21:01 UTC 2008


Style nit:  try to respect the local style of the file (ideally: project)
you're hacking in.  (one of the danga.com/commit.bml rules)

Notably, this is inconsistent with the rest of the file:

+    unless( $ss->xmlns eq $self->namespace ) {

Should be:

+    unless ($ss->xmlns eq $self->namespace) {


On Sun, Jul 27, 2008 at 3:11 PM, <commits at code.sixapart.com> wrote:

>  r6512 at coke:  josboum | 2008-07-27 01:07:51 +0200
>  * log stream errors clearly and don't just silently disconnect
>  * this addresses a FIXME
>
>
> _U  trunk/
> U   trunk/DJabberd/lib/DJabberd/Connection/ServerIn.pm
>
>
>
> Property changes on: trunk
> ___________________________________________________________________
> Name: svk:merge
>   - 02e31fea-a713-0410-9bb5-81a53d0f95f7:/djabberd-trunk:4879
> 1b5ff1af-660f-0410-86e2-35bade70ffec:/trunk/djabberd:61
> 391f84f8-cfa2-4f6b-a47d-f52c5dc88d86:/local/sixapart/djabberd-trunk:6511
> 54bb65a0-b99f-4f2b-b22a-e47d41dc43c7:/groupchat:328
> 54bb65a0-b99f-4f2b-b22a-e47d41dc43c7:/local:667
>   + 02e31fea-a713-0410-9bb5-81a53d0f95f7:/djabberd-trunk:4879
> 1b5ff1af-660f-0410-86e2-35bade70ffec:/trunk/djabberd:61
> 391f84f8-cfa2-4f6b-a47d-f52c5dc88d86:/local/sixapart/djabberd-trunk:6512
> 54bb65a0-b99f-4f2b-b22a-e47d41dc43c7:/groupchat:328
> 54bb65a0-b99f-4f2b-b22a-e47d41dc43c7:/local:667
>
> Modified: trunk/DJabberd/lib/DJabberd/Connection/ServerIn.pm
> ===================================================================
> --- trunk/DJabberd/lib/DJabberd/Connection/ServerIn.pm  2008-07-27 22:10:59
> UTC (rev 780)
> +++ trunk/DJabberd/lib/DJabberd/Connection/ServerIn.pm  2008-07-27 22:11:09
> UTC (rev 781)
> @@ -22,8 +22,16 @@
>  sub on_stream_start {
>     my ($self, $ss) = @_;
>     $self->{in_stream} = 1;
> -    return $self->close unless $ss->xmlns eq $self->namespace; # FIXME:
> should be stream error
>
> +    ### namespace mismatch is a streamerror
> +    unless( $ss->xmlns eq $self->namespace ) {
> +        $self->stream_error(
> +            sprintf "namespace mismatch: client->%s server->%s",
> +            $ss->xmlns, $self->namespace
> +        );
> +        $self->close;
> +    }
> +
>     if ($ss->announced_dialback) {
>         $self->{announced_dialback} = 1;
>         $self->start_stream_back($ss,
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/djabberd/attachments/20080727/d0da2e9f/attachment.htm 


More information about the Djabberd mailing list