diff src/network.c @ 1087:56c7ceb986a8

[gaim-migrate @ 1097] thank god, someone finally redid the proxy stuff. i think most of it works even. isn't that neat? thanks adam. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 12 Nov 2000 23:54:07 +0000
parents b402a23f35df
children
line wrap: on
line diff
--- a/src/network.c	Sun Nov 12 14:14:12 2000 +0000
+++ b/src/network.c	Sun Nov 12 23:54:07 2000 +0000
@@ -18,56 +18,3 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-
-#ifdef HAVE_CONFIG_H
-#include "../config.h"
-#endif
-#include <netdb.h>
-#include <gtk/gtk.h>
-#include <unistd.h>
-#include <errno.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <sys/socket.h>
-#include "gaim.h"
-#include "proxy.h"
-#include "gnome_applet_mgr.h"
-
-unsigned int *get_address(char *hostname)
-{
-	struct hostent *hp;
-	unsigned int *sin=NULL;
-	if ((hp = proxy_gethostbyname(hostname))) {
-		sin = (unsigned int *)g_new0(struct sockaddr_in, 1);
-		memcpy(sin, hp->h_addr, hp->h_length);
-	}
-	return sin;
-}
-
-int connect_address(unsigned int addy, unsigned short port)
-{
-        int fd;
-	struct sockaddr_in sin;
-
-	sin.sin_addr.s_addr = addy;
-	sin.sin_family = AF_INET;
-	sin.sin_port = htons(port);
-	
-	fd = socket(AF_INET, SOCK_STREAM, 0);
-	
-	if (fd > -1) {
-		if (quad_addr)
-			g_free (quad_addr);
-		
-		quad_addr=g_strdup(inet_ntoa(sin.sin_addr));
-		if (proxy_connect(fd, (struct sockaddr *)&sin, sizeof(sin)) > -1) {
-			return fd;
-		}
-	}
-	return -1;
-}
-