summaryrefslogtreecommitdiff
path: root/multimedia/xanim/patches/patch-xa__input.c
blob: b15da480de1b1dd1d49ae28cd586d912ffad2235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
$NetBSD: patch-xa__input.c,v 1.1 2013/08/31 14:52:50 joerg Exp $

--- xa_input.c.orig	2013-08-31 14:16:57.000000000 +0000
+++ xa_input.c
@@ -1025,28 +1025,28 @@ char *machine, *user_cmd, *passwd_cmd, *
   memset(&data,0,sizeof(data));
   memset(&from,0,sizeof(from));
   if (gethostname(hostname, sizeof(hostname)) < 0)
-						return(xa_ftp_abort(xin));
+						return(xa_ftp_abort(*xin));
   if ((host= (struct hostent *)gethostbyname(hostname)) == 0)
-						return(xa_ftp_abort(xin));
+						return(xa_ftp_abort(*xin));
   data.sin_family = host->h_addrtype;
   memcpy( (char *)&data.sin_addr, (char *)host->h_addr_list[0], host->h_length);
   if ((tmp_sock = socket ( AF_INET  , SOCK_STREAM , 0 )) < 0)
-						return(xa_ftp_abort(xin));
+						return(xa_ftp_abort(*xin));
   len = 1;
   if (setsockopt(tmp_sock, SOL_SOCKET, SO_REUSEADDR,
 			(char *)(&len), sizeof(len)) < 0)
-			{ close(tmp_sock); return(xa_ftp_abort(xin)); }
+			{ close(tmp_sock); return(xa_ftp_abort(*xin)); }
 
   data.sin_port = 0;
   if ( bind(tmp_sock, (struct sockaddr *)&data, sizeof(data)) < 0 )
-			{ close(tmp_sock); return(xa_ftp_abort(xin)); }
+			{ close(tmp_sock); return(xa_ftp_abort(*xin)); }
 
   len = sizeof(data);
   if (getsockname(tmp_sock, (struct sockaddr *)&data, &len) < 0 )
-			{ close(tmp_sock); return(xa_ftp_abort(xin)); }
+			{ close(tmp_sock); return(xa_ftp_abort(*xin)); }
 
   if (listen(tmp_sock, 4) < 0 )
-			{ close(tmp_sock); return(xa_ftp_abort(xin)); }
+			{ close(tmp_sock); return(xa_ftp_abort(*xin)); }
 
      /* POD add support for PORT command? */
   addr = (xaUBYTE *) (&data.sin_addr);
@@ -1059,15 +1059,15 @@ char *machine, *user_cmd, *passwd_cmd, *
 
   if (xa_ftp_send_cmd(xin, port_cmd, &retcode) == xaFALSE) 
 	{ fprintf(stderr,"FTP: send cmd err\n"); 
-	  close(tmp_sock); return(xa_ftp_abort(xin)); }
+	  close(tmp_sock); return(xa_ftp_abort(*xin)); }
 
   if (xa_ftp_send_cmd(xin, file_cmd, &retcode) == xaFALSE) 
 	{ fprintf(stderr,"FTP: send cmd err\n"); 
-	  close(tmp_sock); return(xa_ftp_abort(xin)); }
+	  close(tmp_sock); return(xa_ftp_abort(*xin)); }
 
   len = sizeof(from);
   xin->dsock = accept((int)tmp_sock, (struct sockaddr *) &from, (int *)&len);
-  if (xin->dsock < 0) { close(tmp_sock); return(xa_ftp_abort(xin)); }
+  if (xin->dsock < 0) { close(tmp_sock); return(xa_ftp_abort(*xin)); }
   close(tmp_sock);
   return(xaTRUE);
 }