sdp_client.c (2fca4dad957cd7b88f4657ed51e89c12615dda72) sdp_client.c (b93f89661ecd1d19be40311be96b92932960a800)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 450 unchanged lines hidden (view full) ---

459 log_error("Mismatching transaction ID, expected %u, found %u.", sdp_client_transaction_id, responseTransactionID);
460 return;
461 }
462
463 sdp_client_pdu_id = (sdp_pdu_id_t)packet[0];
464 switch (sdp_client_pdu_id){
465 case SDP_ErrorResponse:
466 log_error("Received error response with code %u, disconnecting", packet[2]);
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 450 unchanged lines hidden (view full) ---

459 log_error("Mismatching transaction ID, expected %u, found %u.", sdp_client_transaction_id, responseTransactionID);
460 return;
461 }
462
463 sdp_client_pdu_id = (sdp_pdu_id_t)packet[0];
464 switch (sdp_client_pdu_id){
465 case SDP_ErrorResponse:
466 log_error("Received error response with code %u, disconnecting", packet[2]);
467 l2cap_disconnect(sdp_client_sdp_cid, 0);
467 l2cap_disconnect(sdp_client_sdp_cid);
468 return;
469#ifdef ENABLE_SDP_EXTRA_QUERIES
470 case SDP_ServiceSearchResponse:
471 sdp_client_parse_service_search_response(packet, size);
472 break;
473 case SDP_ServiceAttributeResponse:
474 sdp_client_parse_service_attribute_response(packet, size);
475 break;

--- 5 unchanged lines hidden (view full) ---

481 log_error("PDU ID %u unexpected/invalid", sdp_client_pdu_id);
482 return;
483 }
484
485 // continuation set or DONE?
486 if (sdp_client_continuation_state_len == 0){
487 log_debug("SDP Client Query DONE! ");
488 sdp_client_state = QUERY_COMPLETE;
468 return;
469#ifdef ENABLE_SDP_EXTRA_QUERIES
470 case SDP_ServiceSearchResponse:
471 sdp_client_parse_service_search_response(packet, size);
472 break;
473 case SDP_ServiceAttributeResponse:
474 sdp_client_parse_service_attribute_response(packet, size);
475 break;

--- 5 unchanged lines hidden (view full) ---

481 log_error("PDU ID %u unexpected/invalid", sdp_client_pdu_id);
482 return;
483 }
484
485 // continuation set or DONE?
486 if (sdp_client_continuation_state_len == 0){
487 log_debug("SDP Client Query DONE! ");
488 sdp_client_state = QUERY_COMPLETE;
489 l2cap_disconnect(sdp_client_sdp_cid, 0);
489 l2cap_disconnect(sdp_client_sdp_cid);
490 return;
491 }
492 // prepare next request and send
493 sdp_client_state = W2_SEND;
494 l2cap_request_can_send_now_event(sdp_client_sdp_cid);
495 return;
496 }
497

--- 300 unchanged lines hidden ---
490 return;
491 }
492 // prepare next request and send
493 sdp_client_state = W2_SEND;
494 l2cap_request_can_send_now_event(sdp_client_sdp_cid);
495 return;
496 }
497

--- 300 unchanged lines hidden ---