Merge branch 'develop' into contrib/flash-pins
This commit is contained in:
commit
bb6e8d9bea
@ -50,23 +50,13 @@
|
||||
/**
|
||||
* \name Button configurations
|
||||
*
|
||||
* Configure a button as power on/off: We use the right button for both boards.
|
||||
* @{
|
||||
*/
|
||||
#ifndef BUTTON_SENSOR_CONF_ENABLE_SHUTDOWN
|
||||
#define BUTTON_SENSOR_CONF_ENABLE_SHUTDOWN 1
|
||||
#endif
|
||||
|
||||
/* Notify various examples that we have Buttons */
|
||||
#define PLATFORM_HAS_BUTTON 1
|
||||
#define PLATFORM_SUPPORTS_BUTTON_HAL 1
|
||||
|
||||
/*
|
||||
* Override button symbols from dev/button-sensor.h, for the examples that
|
||||
* include it
|
||||
*/
|
||||
#define button_sensor button_left_sensor
|
||||
#define button_sensor2 button_right_sensor
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Platform-specific define to signify sensor reading failure */
|
||||
|
@ -36,9 +36,6 @@
|
||||
#ifndef PROJECT_CONF_H_
|
||||
#define PROJECT_CONF_H_
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Disable button shutdown functionality */
|
||||
#define BUTTON_SENSOR_CONF_ENABLE_SHUTDOWN 0
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Change to match your configuration */
|
||||
#define BOARD_CONF_DEBUGGER_DEVPACK 1
|
||||
|
@ -128,7 +128,8 @@ PT_THREAD(handle_output(struct httpd_state *s))
|
||||
s->script = NULL;
|
||||
s->script = httpd_simple_get_script(&s->filename[1]);
|
||||
if(s->script == NULL) {
|
||||
strncpy(s->filename, "/notfound.html", sizeof(s->filename));
|
||||
strncpy(s->filename, "/notfound.html", sizeof(s->filename) - 1);
|
||||
s->filename[sizeof(s->filename) - 1] = '\0';
|
||||
PT_WAIT_THREAD(&s->outputpt,
|
||||
send_headers(s, http_header_404));
|
||||
PT_WAIT_THREAD(&s->outputpt,
|
||||
@ -170,7 +171,8 @@ PT_THREAD(handle_input(struct httpd_state *s))
|
||||
urlconv_tofilename(s->filename, s->inputbuf, sizeof(s->filename));
|
||||
#else /* URLCONV */
|
||||
if(s->inputbuf[1] == ISO_space) {
|
||||
strncpy(s->filename, http_index_html, sizeof(s->filename));
|
||||
strncpy(s->filename, http_index_html, sizeof(s->filename) - 1);
|
||||
s->filename[sizeof(s->filename) - 1] = '\0';
|
||||
} else {
|
||||
s->inputbuf[PSOCK_DATALEN(&s->sin) - 1] = 0;
|
||||
strncpy(s->filename, s->inputbuf, sizeof(s->filename));
|
||||
|
@ -376,7 +376,9 @@ in()
|
||||
static void
|
||||
init()
|
||||
{
|
||||
UIP_MCAST6_STATS_INIT(NULL);
|
||||
ESMRF_STATS_INIT();
|
||||
UIP_MCAST6_STATS_INIT(&stats);
|
||||
|
||||
uip_mcast6_route_init();
|
||||
/* Register the ICMPv6 input handler */
|
||||
uip_icmp6_register_input_handler(&esmrf_icmp_handler);
|
||||
|
@ -68,16 +68,9 @@
|
||||
/* Stats datatype */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
struct esmrf_stats {
|
||||
uint16_t mcast_in_unique;
|
||||
uint16_t mcast_in_all; /* At layer 3 */
|
||||
uint16_t mcast_in_ours; /* Unique and we are a group member */
|
||||
uint16_t mcast_fwd; /* Forwarded by us but we are not the seed */
|
||||
uint16_t mcast_out; /* We are the seed */
|
||||
uint16_t mcast_bad;
|
||||
uint16_t mcast_dropped;
|
||||
uint16_t icmp_out;
|
||||
uint16_t icmp_in;
|
||||
uint16_t icmp_bad;
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#endif /* ESMRF_H_ */
|
||||
|
@ -70,18 +70,6 @@
|
||||
#define SMRF_MAX_SPREAD 4
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Stats datatype */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
struct smrf_stats {
|
||||
uint16_t mcast_in_unique;
|
||||
uint16_t mcast_in_all; /* At layer 3 */
|
||||
uint16_t mcast_in_ours; /* Unique and we are a group member */
|
||||
uint16_t mcast_fwd; /* Forwarded by us but we are not the seed */
|
||||
uint16_t mcast_out; /* We are the seed */
|
||||
uint16_t mcast_bad;
|
||||
uint16_t mcast_dropped;
|
||||
};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#endif /* SMRF_H_ */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @} */
|
||||
|
@ -35,7 +35,7 @@ sp_balance_nested_parens=false
|
||||
align_keep_tabs=false
|
||||
align_with_tabs=false
|
||||
align_on_tabstop=false
|
||||
align_number_left=false
|
||||
align_number_right=false
|
||||
align_func_params=false
|
||||
align_same_func_call_params=false
|
||||
align_var_def_colon=false
|
||||
|
@ -579,8 +579,10 @@ tun_alloc(char *dev, int tap)
|
||||
* IFF_NO_PI - Do not provide packet information
|
||||
*/
|
||||
ifr.ifr_flags = (tap ? IFF_TAP : IFF_TUN) | IFF_NO_PI;
|
||||
if(*dev != 0)
|
||||
strncpy(ifr.ifr_name, dev, IFNAMSIZ);
|
||||
if(*dev != 0) {
|
||||
strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name) - 1);
|
||||
ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\0';
|
||||
}
|
||||
|
||||
if((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ) {
|
||||
close(fd);
|
||||
@ -806,10 +808,11 @@ main(int argc, char **argv)
|
||||
|
||||
case 't':
|
||||
if(strncmp("/dev/", optarg, 5) == 0) {
|
||||
strncpy(tundev, optarg + 5, sizeof(tundev));
|
||||
strncpy(tundev, optarg + 5, sizeof(tundev) - 1);
|
||||
} else {
|
||||
strncpy(tundev, optarg, sizeof(tundev));
|
||||
strncpy(tundev, optarg, sizeof(tundev) - 1);
|
||||
}
|
||||
tundev[sizeof(tundev) - 1] = '\0';
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
|
Loading…
Reference in New Issue
Block a user