Make server port configurable
[cascardo/rnetproxy.git] / proto_detect.c
index 57bd01a..f325dfe 100644 (file)
@@ -20,7 +20,6 @@
 #include <gnet.h>
 #include <glib.h>
 #include "proto_detect.h"
-#include "jabber.h"
 
 static void proto_connect (net_hook_t* hook)
 {
@@ -42,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.",