Updated API for uiplib and resolv to use uip_ipaddr_t instead of uint16_t for compability with IPv6
This commit is contained in:
parent
c13bb8666b
commit
b54c6e673b
22 changed files with 194 additions and 106 deletions
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: ftp.c,v 1.6 2008/02/08 22:50:23 oliverschmidt Exp $
|
||||
* $Id: ftp.c,v 1.7 2010/05/31 15:22:08 nifi Exp $
|
||||
*/
|
||||
/* Note to self: It would be nice to have a "View" option in the download dialog. */
|
||||
|
||||
|
@ -312,7 +312,8 @@ make_connectionwindow(void)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(ftp_process, ev, data)
|
||||
{
|
||||
u16_t ipaddr[2], *ipaddrptr;
|
||||
uip_ipaddr_t ipaddr;
|
||||
uip_ipaddr_t *ipaddrptr;
|
||||
|
||||
PROCESS_BEGIN();
|
||||
|
||||
|
@ -425,7 +426,7 @@ PROCESS_THREAD(ftp_process, ev, data)
|
|||
} else if((struct ctk_button *)data == &connectbutton) {
|
||||
ctk_dialog_close();
|
||||
#if UIP_UDP
|
||||
if(uiplib_ipaddrconv(hostname, (unsigned char *)ipaddr) == 0) {
|
||||
if(uiplib_ipaddrconv(hostname, &ipaddr) == 0) {
|
||||
ipaddrptr = resolv_lookup(hostname);
|
||||
if(ipaddrptr == NULL) {
|
||||
resolv_query(hostname);
|
||||
|
@ -435,12 +436,12 @@ PROCESS_THREAD(ftp_process, ev, data)
|
|||
connection = ftpc_connect(ipaddrptr, HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
} else {
|
||||
connection = ftpc_connect(ipaddr, HTONS(21));
|
||||
connection = ftpc_connect(&ipaddr, HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
}
|
||||
#else /* UIP_UDP */
|
||||
uiplib_ipaddrconv(hostname, (unsigned char *)ipaddr);
|
||||
connection = ftpc_connect(ipaddr, HTONS(21));
|
||||
uiplib_ipaddrconv(hostname, &ipaddr);
|
||||
connection = ftpc_connect(&ipaddr, HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
#endif /* UIP_UDP */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue