lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Problems Getting Adams Http server sample running.....


From: Lee Trueman
Subject: [lwip-users] Problems Getting Adams Http server sample running.....
Date: Tue, 31 Aug 2004 09:36:31 +0100

Hi all,
I'm using LwIP 1.0.0 with OS uCOS-II ver2.52 on a M16C uController. I've got the stack all up and running very nicely, got two listerning connections 1 UDP and 1 TCP. Using a windows client I wrote I can simulate data transfers between these no problems there. I'm also using the DHCP client for IP configuration, this is working very good. ICMP works no problem. So I don't understand why I keep getting this pbuf assert when tring to use adams http sample webserver. The webpage get served and is displayed on browser. I've added the code plus my debug output, any help would be much welcomed.

/* process incoming conn */
static int process_connection (struct netconn *conn)
{
u16_t len;
char *req;
struct netbuf *buf;

       
        buf = netconn_recv(conn);
        printf("http_test: netconn_recv !\n");

        netbuf_data(buf, &req, &len);
//    netbuf_delete(buf);

        printf("http_test: netbuf_data !\n");

//      printf("http_test: %s !\n", req);


        if((req[0] == 'G') && (req[1] == 'E')
        && (req[2] == 'T'));
                {
                printf("http_test: netconn_write !\n");
                netconn_write(conn, &index, sizeof(index), NETCONN_NOCOPY);
//              printf("http_test: netconn_write !\n");
//              netconn_write(conn, &html_index, sizeof(html_index), NETCONN_NOCOPY);
                printf("http_test: netconn_close !\n");
                netconn_close(conn);
                }
}

/* create http listerning socket */
static void http_test (void *arg)
{
struct netconn *conn, *newconn;


        conn = netconn_new(NETCONN_TCP);
        printf("http_test: socket created !\n");

        netconn_bind(conn, NULL, 80);
        printf("http_test: socket binded !\n");

        netconn_listen(conn);
        printf("http_test: socket listen !\n");

        while(ETERNITY)
                {      
                newconn = netconn_accept(conn);
                printf("http_test: socket accept !\n");

                process_connection(newconn);
                printf("http_test: process connection !\n");

                netconn_delete(newconn);
                printf("http_test: netconn delete !\n");
                }
}

/* debug output */
OSCreateTasks !
Tasks created !
system initalisation !
eth_netif done !
tcp_test: socket created !
tcp_bind: bind to port 3002
tcp_test: socket binded !
tcp_test: socket listen !
udp_test: socket created !
udp_test: socket binded !
http_test: socket created !
tcp_bind: bind to port 80
http_test: socket binded !
http_test: socket listen !
TCP connection request 3806 -> 80.
TCP connection established 3806 -> 80.
http_test: socket accept !
tcp_recved: recveived 128 bytes, wnd 1024 (0).
http_test: netconn_recv !
http_test: netbuf_data !
http_test: netconn_write !
http_test: netconn_close !
http_test: process connection !
tcp_close: closing in state State: ESTABLISHED

http_test: netconn delete !
TCP connection closed 3806 -> 80.
tcp_pcb_purge
Assertion "p != NULL" failed at line 554 in .\src\core\\pbuf.c

Regards
Lee Trueman

Lee Trueman
Design Engineer
COE Limited
Tel:    0113 230 8820
Fax:    0113 279 9229
www.coe.co.uk

<<Lee Trueman (address@hidden).vcf>>


This email is confidential and should not be used/viewed by anyone who is not the original intended recipient.
If you have received this e-mail in error please inform the sender and delete it from your mailbox or any other storage mechanism.

COE Limited cannot accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of COE Limited or one of its agents.

Visit COE on the Web http://www.coe.co.uk

Attachment: Lee Trueman (LTrueman@coe.co.uk).vcf
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]