Commit graph

16 commits

Author SHA1 Message Date
Oliver Schmidt 1eda821a75 Fixed severe bug in PSOCK_READTO (?)
Either I found and fixed a severe bug in PSOCK_READTO() or I misunderstood something completely. To me PSOCK_READTO() is supposed to return if either the supplied character was read or if the user supplied buffer is exhausted - sor far so good.

However if the latter occurs up to now PSOCK_READTO() was continuing to process characters already read from the network (aka present in the uIP buffer) in order to check if the supplied character was found there and adjust the return value accordingly. But this means that the character processed this way were lost forever for the caller as the next call to PSOCK_READTO() would continue to read past the characters processed this way.

Therefore I removed that character processing altogether. So now if the user supplied buffer is exhausted before the supplied character is found the next call to PSOCK_READTO() starts exactly where previous call left off.
2013-02-10 15:41:34 +01:00
Adam Dunkels 944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Nicholas J Humfrey 3fe55673d3 Converted deprecated uIP types in the network stack to standard C99 names (in stdint.h) 2012-02-17 22:45:13 +00:00
Joakim Eriksson c9af578eab added psock function for reading specified number of bytes 2011-03-09 02:40:53 -05:00
nifi 01b1359b1f removed unused (and slightly problematic) code 2010-06-15 14:19:22 +00:00
oliverschmidt 315e446584 Adjusted formal parameter to single existing actual parameter. 2010-03-29 20:26:14 +00:00
adamdunkels 4d68bdf74b Bugfix and addition by Dogan Yazar: psock_readbuf() shouldn't wait for a full buffer (which might never happen); a new function for sending strings that batches data and sends full buffers instead of individual strings. 2010-03-24 21:03:32 +00:00
dak664 c1b7375a5a *** empty log message *** 2009-07-23 16:13:48 +00:00
adamdunkels fdd05f5c71 Bugfix: psock send should use PT_WAIT_UNTIL() not PT_YIELD_UNTIL(). This improves TCP throughput by 100x under minimal-net 2009-04-28 13:52:04 +00:00
oliverschmidt 28889f2210 Commented out otherwise unguarded printf(). 2008-11-06 23:15:58 +00:00
adamdunkels d73124cc5e Bugfix: there was a problem with TCP segments not being properly retransmitted for protosockets-based applications. Cleaning up the logic around acknowledgements and retransmissions fixed the bugs pertaining to retransmissions of lost packets. This bugfix affects both the telnet server and the web server (which now work as expected wrt packet loss). 2008-10-31 18:10:24 +00:00
adamdunkels 1e1e44a3f8 Fixed compiler warnings to make code compile with gcc's -pedantic switch 2007-11-17 18:01:00 +00:00
matsutsuka 8fd76351eb removed debugging printf 2007-09-08 16:12:54 +00:00
matsutsuka 4cd7302ecb make an old debbuging printf optional 2007-09-08 15:32:30 +00:00
matsutsuka 9d4fc0a1a8 Support for z80(sdcc) port.
In order to support, some core modules are modified as follows:

core/sys/dsc.h
- If CTK_CONF_ICONS is diabled, the whole icon-related code is disabled.
- DSC_HEADER is changed to remove extra semicolon.

core/sys/process.h
- process_data_t is expressed by void* in signatures (known bug on sdcc).

core/sys/autostart.h
- autostart_processes is changed to remove extra semicolon.

core/sys/cc.h
- CC_CONF_ASSIGN_AGGREGATE is introduced.
- CC_CONF_INC_CAST_POINTER is introduced, a workaround of a kind
  of sdcc bug for an increment.

core/net/hc.c
core/net/uip_arp.c
core/net/uaodv.c
- Aggregation assignments are changed to uip_ipaddr_copy.

core/net/psock.c
core/net/uipbuf.c
core/net/dhcpc.c
apps/shell/shell.c
core/ctk/vnc-server.c
core/ctk/vnc-out.c
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

core/net/uip-over-mesh.c
- An extra semicolon is removed.

apps/dhcp/dhcp-dsc.c
apps/shell/shell-dsc.
apps/ftp/ftp-dsc.c
apps/process-list/process-list-dsc.c
apps/email/email-dsc.c
apps/webserver/webserver-dsc.c
apps/vnc/vnc-dsc.c
apps/vnc/vnc-viewer.h
apps/webbrowser/www-dsc.c
apps/about/about-dsc.c
apps/irc/irc-dsc.c
apps/telnet/telnet-dsc.c
apps/telnetd/telnetd-dsc.c
apps/netconf/netconf-dsc.c
apps/directory/directory-dsc.c
pps/calc/calc-dsc.c
- Modify an extern type to a real declaration, which is static
  to prevent a compile error.

core/net/mac/xmac.c
- Variables cannot be defined in a head of block on sdcc.

core/ctk/ctk.h
core/ctk/ctk.c
apps/program-handler/program-handler.c
- If CTK_CONF_ICONS is diabled, the whole icon-related code is disabled.

Makefile.include
- Add a set of configuration for an assembler.
- $(CLEAN) variable is introduced for customized cleanup.

apps/process-list/process-list.c
- PROCESSLIST_CONF_HEIGHT is introduced to address smaller screen size.

core/lib/ctk-filedialog.c
- FILES_CONF_HEIGHT is introduced to address smaller screen size.
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

apps/vnc/vnc-viewer.c
- A cast is added to prevent a compile error.
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

apps/webbrowser/webclient.c
- CC_CONF_INC_CAST_POINTER is introduced, a workaround of a kind
  of sdcc bug for an increment.

core/loader/elfloader.c
- A cast is added to prevent a compile error.

core/net/rime/rimeaddr.c
- An initialization is added to prevent a compile error.

core/net/rime/rudolph0.c
- NULL is changed to 0, because NULL causes a compile error.

core/net/rime/route-discovery.c
- Add an argument to match the definition of nf_callbacks.

cpu/z80/strcasecmp.h
cpu/z80/strcasecmp.c
cpu/z80/contiki-sdcc-conf.h
cpu/z80/mtarch.c
cpu/z80/mtarch.h
cpu/z80/Makefile.z80
- New files to make compilation availble on sdcc.
- Added support for multithreading.
2007-08-30 14:39:16 +00:00
adamdunkels c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00