Tell automake to include the configuration file in distribution
[cascardo/rnetproxy.git] / proto_detect.c
index afd8cde..f325dfe 100644 (file)
@@ -1,7 +1,25 @@
+/*
+** Copyright (C) 2006 Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
+**  
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**  
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**  
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+**  
+*/
+
 #include <gnet.h>
 #include <glib.h>
 #include "proto_detect.h"
-#include "jabber.h"
 
 static void proto_connect (net_hook_t* hook)
 {
@@ -23,7 +41,8 @@ static void proto_read (net_hook_t* hook, gchar* buffer, size_t len)
   g_string_append_len (str, buffer, len);
   if (str->len >= 7)
     {
-      if (!strncmp (str->str, "<stream", 7))
+      if (!strncmp (str->str, "<stream", 7) ||
+         !strncmp (str->str, "<?xml ", 6))
        {
          /* Connection is a Jabber client */
          g_debug ("Connection from %s is a Jabber client.",