mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-25 09:02:30 +00:00
pbap_client: init handle + name on card start
This commit is contained in:
parent
820092f9d4
commit
8336ee1e77
@ -586,8 +586,6 @@ static void pbap_client_process_vcard_listing(uint8_t *packet, uint16_t size){
|
|||||||
int handle_found = 0;
|
int handle_found = 0;
|
||||||
char name[PBAP_MAX_NAME_LEN];
|
char name[PBAP_MAX_NAME_LEN];
|
||||||
char handle[PBAP_MAX_HANDLE_LEN];
|
char handle[PBAP_MAX_HANDLE_LEN];
|
||||||
name[0] = 0;
|
|
||||||
handle[0] = 0;
|
|
||||||
while (data_len--){
|
while (data_len--){
|
||||||
yxml_ret_t r = yxml_parse(&pbap_client->xml_parser, *data++);
|
yxml_ret_t r = yxml_parse(&pbap_client->xml_parser, *data++);
|
||||||
switch (r){
|
switch (r){
|
||||||
@ -604,10 +602,12 @@ static void pbap_client_process_vcard_listing(uint8_t *packet, uint16_t size){
|
|||||||
if (!card_found) break;
|
if (!card_found) break;
|
||||||
if (strcmp("name", pbap_client->xml_parser.attr) == 0){
|
if (strcmp("name", pbap_client->xml_parser.attr) == 0){
|
||||||
name_found = 1;
|
name_found = 1;
|
||||||
|
name[0] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (strcmp("handle", pbap_client->xml_parser.attr) == 0){
|
if (strcmp("handle", pbap_client->xml_parser.attr) == 0){
|
||||||
handle_found = 1;
|
handle_found = 1;
|
||||||
|
handle[0] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user