Detects GNUTLS and build with it.
[cascardo/rnetproxy.git] / popproxy.c
index d43c9d6..f6c4b57 100644 (file)
@@ -24,7 +24,7 @@
 #include <unistd.h>
 #include "log.h"
 #include "nethook.h"
-#include "proto_detect.h"
+#include "null.h"
 
 #define CONFFILE SYSCONFDIR "/popproxy.conf"
 
@@ -37,7 +37,7 @@ void new_client (GServer* server, GConn* conn, gpointer data)
       return;
     }
   g_message ("Received connection from %s.", conn->hostname);
-  hook = proto_detect_new (conn);
+  hook = null_hook_new (conn, data);
   gnet_conn_read (conn);
 }
 
@@ -58,6 +58,7 @@ int main (int argc, char** argv)
   GInetAddr* inetaddr;
   gchar* conf_address;
   gint port;
+  gchar *server_address;
 
   gnet_init ();
   pop_log_init ();
@@ -78,11 +79,12 @@ int main (int argc, char** argv)
 
   conf_address = g_key_file_get_string (keyfile, "global", "address", NULL);
   port = g_key_file_get_integer (keyfile, "global", "port", NULL);
+  server_address = g_key_file_get_string (keyfile, "global", "server", NULL);
 
   g_message ("Listen address is %s:%d.", conf_address, port);
 
   inetaddr = gnet_inetaddr_new_nonblock (conf_address, port);
-  gnet_server_new (inetaddr, port, new_client, NULL);
+  gnet_server_new (inetaddr, port, new_client, server_address);
 
   daemon (0, 0);