Commit Graph

773 Commits

Author SHA1 Message Date
Mohamed Seliem 88fdc46e03 update httpd_cgi to enable the compilation of webserver-ipv6 example
this simple change fixes the bug reported in @#1541.
../../apps/webserver/httpd.h:63:9: note: expected ‘uip_ip6addr_t’ but argument is of type ‘union uip_ipaddr_t *’
2016-12-04 19:03:15 +02:00
Antonio Lignan efde9132a8 Merge pull request #1769 from gebart/pr/rest-engine-periodic-add-poll
rest-engine: Allow adding periodic resources after starting REST engine
2016-11-11 09:01:32 +01:00
aho 8306aded79 fixed typo in debug PRINTF definition 2016-10-25 12:38:15 +03:00
Oliver Schmidt 957ac63a7c Improved dicarding of text in the HTML header.
Plain text in the HTML header (think of <title>text</title>) is collected as usual. The decision to discard it is triggered by the first withspace following. In the usual case of the <body> no preceeded by any whitespace this means that by the point the first whitespace is encountered we're not in "discard mode" anymore and therefore incorrectly render the text.

Explicitly calling do_word() just before leaving "discard mode" discards all text collected so far.
2016-10-11 11:25:31 +02:00
Nicolas Tsiftes fa6771f058 Merge pull request #1677 from gebart/pr/lwm2m-instance-list
oma-lwm2m: Add functionality to send object instance list as core link format
2016-09-06 16:50:11 +02:00
Joakim Nohlgård f16f5b5241 squash clean up left overs 2016-07-09 10:39:23 +02:00
Joakim Nohlgård 6b238873ef squash move rest-engine timers to activate timer 2016-07-09 10:34:23 +02:00
Joakim Nohlgård e7070a5f79 rest-engine: Allow adding periodic resources after starting REST engine
Without this fix, any periodic resources added after the REST engine was
already running were never started.
2016-07-06 19:18:34 +02:00
Tiago Koji Castro Shibata c2a0f739f7 Compilation targeting c64
Adds some casts required by cc65 compiler and small fixes
2016-06-12 21:16:01 -03:00
Simon Duquennoy c3ea1f9fc6 Orchestra: added support for RPL non-storing mode 2016-06-08 14:03:24 +02:00
Simon Duquennoy 6c946319d9 Merge pull request #1667 from alignan/pull/at-driver
AT driver (master) and example
2016-06-04 22:47:24 +02:00
Joakim Nohlgård e8edb6b1a0 oma-lwm2m: Add JSON writer 2016-05-28 07:55:54 +02:00
Joakim Nohlgård 9832b356ba oma-lwm2m: Use Accept header to determine the writer object for the content 2016-05-28 07:55:27 +02:00
Joakim Nohlgård 14cdb30886 oma-lwm2m: Only send active instances 2016-05-24 20:00:56 +02:00
Joakim Nohlgård 84cd7a4e92 oma-lwm2m: Add functionality to send object instance list as core link format 2016-05-24 20:00:56 +02:00
Nicolas Tsiftes 562a33aa16 Merge pull request #1670 from gebart/pr/lwm2m-decimal-point
oma-lwm2m: Handle text/plain floatfix numbers without decimal point
2016-05-23 15:22:35 +02:00
Yasuyuki Tanaka bc54f8bac3 Orchestra: add NULL checks into new_time_source (eb-per-time-source) 2016-05-21 13:43:42 +02:00
Joakim Nohlgård 99c77bda8c oma-lwm2m: Handle text/plain floatfix numbers without decimal point
Fixes bug: If no decimal point is present then the entire number is
treated as the decimal part instead of the integer part
2016-05-21 09:48:06 +02:00
Simon Duquennoy c7694e4dbd Orchestra: fix orchestra-rule-eb-per-time-source to handle hash collisions 2016-05-20 13:51:24 +02:00
Simon Duquennoy 7e8d042609 Orchestra: fix bug in new_time_source 2016-05-20 13:40:50 +02:00
Simon Duquennoy 287b4767e3 Orchestra: handle case where ORCHESTRA_UNICAST_PERIOD is smaller than the network size 2016-05-20 13:40:20 +02:00
Antonio Lignan 2b30370b42 AT driver (master) and example 2016-05-15 12:19:04 +02:00
Nicolas Tsiftes 98fcac15cd Merge pull request #1651 from gebart/pr/lwm2m-json-sv-bv
oma-lwm2m: Use sv for string value, bv for boolean
2016-05-12 17:01:16 +02:00
Joakim Nohlgård 22e9ccadf7 ipso-temperature: Use "Cel" for degrees celsius
Like the IPSO documentation says
2016-05-04 19:21:56 +02:00
Joakim Nohlgård cb729b0785 oma-lwm2m: Use sv for string value, bv for boolean
Like the OMA docs specify
2016-05-04 19:15:01 +02:00
Nicolas Tsiftes fb5f0f66dd Removed Deluge and associated test files. 2016-04-21 13:24:16 +02:00
Simon Duquennoy a15be9e518 Merge pull request #1438 from jkent/jsonparse
jsonparse: multiple improvements
2016-03-11 14:23:17 +01:00
Joakim Nohlgård 4ff571beb2 apps/er-coap/er-coap-separate.h: fix warning: function declaration isn't a prototype 2016-03-02 07:12:33 +01:00
Joakim Nohlgård 9159903f5a apps/er-coap/er-coap-transactions.h: fix warning: function declaration isn't a prototype 2016-03-02 07:12:31 +01:00
Antonio Lignan 4d4930921e Fixes error when processes name are not used 2016-02-22 16:02:06 +01:00
Simon Duquennoy b53a1569d9 Merge pull request #1439 from jkent/jsontree
jsontree: new features
2016-02-20 12:49:07 +01:00
Simon Duquennoy fa078381cf Fix compiler warnings in shell 2016-02-03 18:01:25 +01:00
zq301 d36eab3750 Update shell-vars.c 2016-01-25 09:35:49 +08:00
zq301 e7c26c57db Update shell-vars.c 2016-01-25 09:35:15 +08:00
zq301 915facad22 a memory overflow in shell-vars.c
" sprintf(numbuf, "0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x",...)" . the formatted data wrote to "numbuf" is 39 bytes, but numbuf is 32 bytes.
2016-01-24 14:39:48 +08:00
Simon Duquennoy c792f5cf4b Merge pull request #1409 from nfi/oma-lwm2m-ipso
Implementation of OMA LWM2M Engine / IPSO Objects
2016-01-17 10:20:33 +01:00
Jeff Kent 7dc1581631 jsonparse: multiple improvements
* input string now can be any json value type
* syntax handling completed
* stack is now used more efficiently for objects
* implemented atomic values true, false, and null
* jsonparse_copy_value now handles escapes
2015-12-28 09:47:12 -06:00
Jeff Kent a65d566dee jsontree: add int pointer types 2015-12-28 09:45:29 -06:00
Jeff Kent bcc7d0a1eb jsontree: add uint type 2015-12-28 09:45:23 -06:00
Jeff Kent fcc87ddce8 jsontree: add JSONTREE_CONF_PRETTY option 2015-12-28 09:45:09 -06:00
Joakim Eriksson a90ff6691a fixed leds control to work with red,green and blue LED - tested with remote. 2015-12-21 13:02:34 +01:00
Atis Elsts d79ce957a1 Adaptive time synchronization for TSCH 2015-12-07 11:51:41 +01:00
Simon Duquennoy 7eabf8d391 TSCH: latest update from https://github.com/EIT-ICT-RICH/contiki 2015-12-04 15:21:58 +01:00
Simon Duquennoy 27da5b8ab5 Orchestra: typo 2015-12-04 15:21:57 +01:00
Simon Duquennoy bc1e27cab7 Added Orchestra, an autonomous scheduler for TSCH exploiting the local RPL state to maintain slotframes and links 2015-12-04 15:21:54 +01:00
Niclas Finne 3dd11603a7 Implementation of OMA LWM2M Engine / IPSO Objects 2015-12-02 15:40:05 +01:00
Simon Duquennoy ebc8d9fb1c Merge pull request #1344 from tsparber/fix-doxygen
doxygen: Fixed all warnings
2015-11-30 22:07:15 +01:00
Tommy Sparber 938a425949 Cleanup trailing spaces and convert tabs to spaces
This commit removes trailing spaces and converts
tabs to spaces in all files affected by fix-doxygen PR.
2015-11-18 11:09:43 +11:00
Tommy Sparber 938d17576b doxygen: Fix many warnings
This commit fixes nearly all of the reported doxygen warnings.

I tried to not clutter the log with removed trailing spaces.
Removed whitespace and converted tab/spaces for all files affected by this commit
are in a separate branch.
2015-11-18 11:07:58 +11:00
Simon Duquennoy b5141f165c www.c: Explicitly declare itoa as it is non-standard and not necessarily in stdlib.h 2015-11-10 14:38:22 +01:00
Simon Duquennoy fbd78a7e3b Merge pull request #1293 from simonduq/pr/fix-warnings
Fix a number of compiler warnings and enable -Werror in Travis
2015-11-10 08:49:11 +01:00
Oliver Schmidt 8e9da827c0 Several minor adjustments. 2015-11-03 22:09:24 +01:00
Oliver Schmidt 0303944d0c Log web browser page attributes free memory left.
After page loading has finished the number of free bytes left for page attributes is logged. It turns out that "usual" pages tend to get along with ~800 bytes while i.e. the Google search pages use all of the 2000 bytes of page attribute memory allocated by default (because of the long URLs with many parameters). So it seems that reducing this default isn't exactly the best way to reduce memory consumption...
2015-11-01 21:22:19 +01:00
Oliver Schmidt 1639b712bb Removed CC_FASTCALL.
CC_FASTCALL was introduced many years ago for the cc65 tool chain. It was never used for another tool chain. With a798b1d648 the cc65 tool chain doesn't need CC_FASTCALL anymore.
2015-11-01 18:10:17 +01:00
Oliver Schmidt 1066bb1a0b Client requested close takes precedence over server initiated close.
When the client has already called webclient_close() it doesn't expect to have webclient_datahandler(NULL, 0) called just because the connection was closed by the server "at the same time". Rather it expects to always have webclient_closed() called.

Calling webclient_datahandler(NULL, 0) instead of webclient_closed() means that the web browser shows "Done" in the status line instead of "Stopped". So the user is mislead to think that he has already seen all of the page.

Note: webclient_close() is called by the client during newdata() so the already existing check for WEBCLIENT_STATE_CLOSE further above doesn't help.
2015-11-01 15:34:09 +01:00
Oliver Schmidt 185be73014 Just some minor optimizations. 2015-11-01 15:18:29 +01:00
Nicolas Tsiftes 566b251797 Merge pull request #1243 from unmole/coap_fix
CoAP: Fix handling of Token Length greater than 8
2015-10-23 17:58:15 +02:00
Simon Duquennoy 343326abee www.c: added #ifdef WITH_PETSCII guards to avoid compiler warning on unused variable wptr 2015-10-20 10:11:48 +02:00
Simon Duquennoy f49b161795 Remove commented-out code 2015-10-20 10:11:47 +02:00
Adam Dunkels 507309b0f5 Cast pointer to uintptr_t type to avoid compiler warnings 2015-10-20 10:11:40 +02:00
Adam Dunkels 160d792399 Cast pointer to uintptr_t type to avoid compiler warnings 2015-10-20 10:11:39 +02:00
Adam Dunkels bd54fe83f8 Cast pointer to uintptr_t type to avoid compiler warnings 2015-10-20 10:11:39 +02:00
Adam Dunkels c262eafe97 Fix compiler warnings 2015-10-20 10:11:30 +02:00
Adam Dunkels 08c6a69fe8 Fix compiler warnings 2015-10-20 10:11:29 +02:00
Adam Dunkels c0de05f9a8 Fix compiler warnings 2015-10-20 10:11:28 +02:00
Adam Dunkels 5e1ce413af Fix compiler warnings 2015-10-20 10:11:27 +02:00
Adam Dunkels 51233a7f88 Fix compiler warnings 2015-10-20 10:11:26 +02:00
Adam Dunkels 1ed9a20fdb Use unsigned long instead of uint32_t to avoid compiler warnings with the printfs 2015-10-20 10:11:25 +02:00
Simon Duquennoy 061c7d15c4 Powertrace: removed unused variables 2015-10-20 09:37:23 +02:00
Simon Duquennoy 10bd49a71a Merge pull request #756 from sieben/dos2unix
dos2unix fix
2015-10-18 20:26:07 +02:00
Niclas Finne d764e09f35 Make sure the url is null terminated in CoAP observe. 2015-09-24 22:51:30 +02:00
Niclas Finne 7edf6e60e9 Changed to use process API to switch process context in CoAP 2015-09-24 22:51:30 +02:00
Joakim Eriksson 539e92c084 Made rest-engine handle multiple init without dropping resources. 2015-09-24 22:51:30 +02:00
Joakim Eriksson 2351ee078a Fixed CoAP format to be a uint16_t since the enum might compile to 8 bit and cause problems if 16-bit format types are used 2015-09-24 22:51:30 +02:00
Joakim Eriksson 1b0cdee9ec Fixed observe to handle subresources and to always create a fake request for notify GETs 2015-09-24 22:51:30 +02:00
Niclas Finne ef9a36f9f6 Ensure parent resources match the path exactly and not as prefix. 2015-09-17 17:55:22 +02:00
Joakim Eriksson fe6d8685ac Fixed support for NULL attributes of resources 2015-09-11 00:52:45 +02:00
Joakim Eriksson 1e0b5292d7 Loop-unroll in CoAP for fixing some potential bugs on some platforms
where size_t is not the same as unsigned int.
2015-09-11 00:52:45 +02:00
Simon Duquennoy 63ddba93a9 Merge pull request #1169 from feshie/pr-warnings-fix
Fix multiple warnings (TCPIP, coap-observe, msp430, z1/tmp102, ContikiMAC)
2015-09-08 09:05:44 +02:00
Arthur Fabre 158087db62 Fix warning in coap-observe
../..//apps/er-coap/er-coap-observe.c:237:15: warning: unused variable
‘content’ [-Wunused-variable]
This was caused by a buffer that was declared, but used only in
commented out code.
The variable was moved to the commented out block.
The block was surrounded by an #if 0 ... #endif to make it easier to
uncomment.
Everything still compiles with the code in question uncommented.
2015-09-07 17:51:27 +01:00
Rémy Léone 7a5071dd30 Adding a gitattributes and correcting line-endings
https://help.github.com/articles/dealing-with-line-endings/
2015-09-07 15:40:02 +02:00
Anmol Sarma c084c46b9b Fix handling of Token Length greater than 8 2015-09-05 20:46:29 +05:30
Antonio Lignan 37470bbc1b Merge pull request #1055 from sumanpanchal/msp430x-elfloader
Added MSP430x ELFLOADER support to load image with large memory model.
2015-08-27 21:19:27 +02:00
Oliver Schmidt 902b21a326 Merge pull request #1188 from oliverschmidt/master
Some finishing touch on the CBM retro targets.
2015-08-08 16:33:59 +02:00
Oliver Schmidt 757809196e Some finishing touch on the CBM retro targets. 2015-08-08 15:41:24 +02:00
Arthur Fabre 5403b2a211 Fix default CoAP header block2 size
When a client sends a CoAP request with no block2 size,
the default one would be set to REST_MAX_CHUNK_SIZE.
However, this is not guaranteed to be a power of 2.
This can lead to clients receiving a bigger payload than expected as
part of the header, and ending up with duplicated content.
Setting the default to COAP_MAX_BLOCK_SIZE,
which is guaranteed to be a power of 2, fixes this.
2015-07-29 16:37:09 +01:00
Oliver Schmidt ab6d6498fe Added missing charset abstraction. 2015-07-16 17:55:26 +02:00
Oliver Schmidt a30e2e0045 Allow to configure Telnetd idle timeout.
The default Telnetd idle timeout of 30 seconds seems somewhat short. Best to have it user-configurable (incl. the option to turn it off with an config value of 0).
2015-07-06 12:25:20 +02:00
Oliver Schmidt a70fbf1bbf Reconfigured Telnet server.
In order to have the wget command make some sense the write command should be present too.
- On the Apple][ reduction of the MTU seems to gain just enough RAM to have the (rather heavy-weight) full-blown C library file I/O working.
- On the C128 there's way too little RAM so there's no wget command but only the file commands.
- On the CBMs a dummy lseek() was necessary to have the read command link.
2015-06-21 21:07:41 +02:00
Oliver Schmidt b8bece508a Fix DHCP client retries.
In order to have DHCP retries actually work dhcpc_appcall() must be called for PROCESS_EVENT_TIMER too.
2015-06-21 14:25:52 +02:00
Sumankumar Panchal db4df30366 Added MSP430X ELFLOADER support to load image with large memory model. 2015-06-15 17:53:18 +05:30
Oliver Schmidt c9edb9006b Merge pull request #1112 from oliverschmidt/master
Various improvements of the HTTP client and web browser.
2015-06-14 16:12:24 +02:00
Oliver Schmidt 3e33a4d355 Made server variant of HTTP strings a superset of the client variant again. 2015-06-08 14:29:34 +02:00
Oliver Schmidt 47bf797864 Added support for form with multiple submit buttons.
Forms with multiple submit buttons are rather rare but nevertheless the most popular web page (www.google.com) contains one with the two submit buttons "Google Search" and "I'm Feeling Lucky". So we want to support that - incl. the usual feature to the interpret first button as default button used when the user presses the ENTER key.
2015-06-07 00:29:29 +02:00
Oliver Schmidt e8b4befd1e Further improved parsing of <SCRIPT> tag.
Script code may contain a '<' as part of a equation. We erroneously interpreted that as start of a tag. Now we check for the very next char to be a '/' as the only tag allowed is the </SCRIPT> tag.
2015-06-07 00:23:44 +02:00
Oliver Schmidt 1d934db654 Reduce overlap on "scroll".
When using the 'down' button on a certain number of lines curently displayed at the bottom of the screen is redisplayed at the top of the screen. Given our usually small screen size and often large pages requiring many 'down' operations the number 'four' seems too generous so lets reduce it to 'two'.
2015-06-05 17:27:08 +02:00
Oliver Schmidt c5103bf997 Removed some redundant redrawing. 2015-06-05 16:59:16 +02:00
Oliver Schmidt f6b315a17f Fixed history handling.
- The wraparound handling when using the history with the 'back' button is actually depending on history_last being unsigned (which is the default for cc65) so define it explicitly as unsigned to make it work on other targets too.
- As there's no 'forward' button it doesn't make sense to keep history entries after using them with the 'back' button. Clearing them on use on the other hand avoids an "infinite history".
2015-06-05 16:34:57 +02:00
Oliver Schmidt e6903e4e7e Recognize HTTPS.
Although we for sure don't support HTTPS we need to recognize it. Nowadays it has become pretty usual to redirect HTTP URLs to HTTPS URLs in order to force privacy (thanks, NSA !). So far our redirection handler didn't recognize an HTTPS URL as abslute URLs and therefore appended it to the curent URL. This led to an endless redirection loop. Now we recognize the HTTPS redirection and generate a minimal document on the fly to inform the user of (for us unrachable) the redirection target.

HTML links with HTTPS URLs are treated just like fragment-only links meaning that they get simply completely ignored.
2015-06-05 16:26:20 +02:00
Oliver Schmidt 2f2295c182 Correctly initialize 'wordlen'. 2015-06-05 16:26:17 +02:00