Merge branch 'develop' of https://github.com/bluekitchen/btstack into develop

This commit is contained in:
Milanka Ringwald 2016-04-01 16:23:37 +02:00
commit 3075c94867
4 changed files with 6 additions and 5 deletions

View File

@ -93,7 +93,7 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
}
break;
case RFCOMM_EVENT_PERSISTENT_CHANNEL:
case DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL:
rfcomm_channel_nr = packet[3];
printf("RFCOMM channel %u was assigned by BTdaemon\n", rfcomm_channel_nr);
bt_send_cmd(&rfcomm_register_service_cmd, rfcomm_channel_nr, 0xffff); // reserved channel, mtu limited by l2cap

View File

@ -108,7 +108,7 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
}
break;
case RFCOMM_EVENT_PERSISTENT_CHANNEL:
case DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL:
rfcomm_channel_nr = packet[3];
printf("RFCOMM channel %u was assigned by BTdaemon\n", rfcomm_channel_nr);
bt_send_cmd(&rfcomm_register_service_cmd, rfcomm_channel_nr, 0xffff); // reserved channel, mtu limited by l2cap

View File

@ -1076,9 +1076,9 @@ static int btstack_command_handler(connection_t *connection, uint8_t *packet, ui
// enforce \0
packet[3+248] = 0;
rfcomm_channel = rfcomm_service_db_channel_for_service((char*)&packet[3]);
log_info("RFCOMM_EVENT_PERSISTENT_CHANNEL %u", rfcomm_channel);
log_info("DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL %u", rfcomm_channel);
uint8_t event[4];
event[0] = RFCOMM_EVENT_PERSISTENT_CHANNEL;
event[0] = DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL;
event[1] = sizeof(event) - 2;
event[2] = 0;
event[3] = rfcomm_channel;

View File

@ -197,6 +197,7 @@ static void btstack_run_loop_posix_execute(void) {
// wait for ready FDs
select( highest_fd+1 , &descriptors_read, &descriptors_write, NULL, timeout);
data_sources_modified = 0;
btstack_linked_list_iterator_init(&it, &data_sources);
while (btstack_linked_list_iterator_has_next(&it) && !data_sources_modified){
@ -214,7 +215,7 @@ static void btstack_run_loop_posix_execute(void) {
log_debug("btstack_run_loop_posix_execute: after ds check\n");
// process timers
// pre: 0 <= tv_usec < 1000000
now_ms = btstack_run_loop_posix_get_time_ms();
while (timers) {
ts = (btstack_timer_source_t *) timers;
if (ts->timeout > now_ms) break;