public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] invalid conversion from void* to void**
@ 2006-05-04 11:43 robert sebestyen
  2006-05-04 12:40 ` Andrew Lunn
  0 siblings, 1 reply; 12+ messages in thread
From: robert sebestyen @ 2006-05-04 11:43 UTC (permalink / raw)
  To: ecos-discuss

First, I would like to apologize myself  for disturbing you with my problem.

I implemented a lwIP into an existing project running on OS ecos, when i 
call the data i receive always invalid conversion from void* to void**! I 
call the lwIP with the following code:



static void

httpget(void *arg)

{

            int k=1;

            int res;

            struct netconn *conn;

            static char httpreq[255];

            struct ip_addr addr;

            char *data;

                cyg_uint16 len, i;





            while(1)

            {

            sprintf(httpreq,"GET 
http://www.ascribo.at/tmobile/showip.php?package=%d HTTP/1.0\r\n\r\n",k);



            k++; //incr. ascribocounter



            struct netbuf *buf;

            // Create a new connection identifier.

            conn = netconn_new(NETCONN_TCP);

        while (1)

                        if(lwip_ppp_status() == 1)

                        {

                                   diag_printf("IP-Address: %u.%u.%u.%u \n",



                                               ip4_addr1(ppp_ip_addr),

                                               ip4_addr2(ppp_ip_addr),

                                               ip4_addr3(ppp_ip_addr),

                                               ip4_addr4(ppp_ip_addr));



                        }// of if



    IP4_ADDR(&addr,213,225,63,42);   //www.ascribo.com (funktioniert!)



            // Tell connection to remote host.

            res=netconn_connect(conn, &addr, 80);

            netconn_write(conn, httpreq, sizeof(httpreq), NETCONN_COPY);

            diag_printf("%d",conn->type);



            while((buf = netconn_recv(conn)) != NULL)

            {

                                    do {

                                                                             
                                                                 
netbuf_data(buf,(void*)&data,&len);

                                               for(i = 0; i < len; i++)

                                               {

                                               diag_printf("%c",data[i]);

                                               }                             
                  }

                                    } while(netbuf_next(buf) >= 0);



                                    netbuf_delete(buf);

                                    cyg_thread_delay(10);

            }

            netconn_close(conn);

            diag_printf("\r\nDisconnected");

            netconn_delete(conn);

            diag_printf("Netconn_Delete");

            }// of while(1)



}//end of static void httpget(void *arg)



I have at the moment any clue how to solve that problem due to the fact that 
i tried any casts already!

Thx for help or any advice!

Robert



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-05-05  7:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 11:43 [ECOS] invalid conversion from void* to void** robert sebestyen
2006-05-04 12:40 ` Andrew Lunn
2006-05-04 13:02   ` robert sebestyen
2006-05-04 13:19     ` Andrew Lunn
2006-05-04 13:31       ` robert sebestyen
2006-05-04 13:33         ` Andrew Lunn
2006-05-04 13:43           ` robert sebestyen
2006-05-04 13:54             ` Andrew Lunn
2006-05-04 14:16               ` robert sebestyen
2006-05-04 14:31                 ` Andrew Lunn
2006-05-04 20:42                 ` [ECOS] eCos port on SPEAR-07-NC03 Evgeny Belyanco
2006-05-05  7:29                   ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).