Lines Matching full:application
77 BT_DBG("session %p application %p appl %d", session, app, appl); in cmtp_application_add()
92 BT_DBG("session %p application %p", session, app); in cmtp_application_del()
187 struct cmtp_application *application; in cmtp_recv_interopmsg() local
205 application = cmtp_application_get(session, CMTP_MSGNUM, msgnum); in cmtp_recv_interopmsg()
206 if (application) { in cmtp_recv_interopmsg()
207 application->state = BT_CONNECTED; in cmtp_recv_interopmsg()
208 application->msgnum = 0; in cmtp_recv_interopmsg()
209 application->mapping = CAPIMSG_APPID(skb->data); in cmtp_recv_interopmsg()
218 application = cmtp_application_get(session, CMTP_MAPPING, appl); in cmtp_recv_interopmsg()
219 if (application) { in cmtp_recv_interopmsg()
220 application->state = BT_CLOSED; in cmtp_recv_interopmsg()
221 application->msgnum = 0; in cmtp_recv_interopmsg()
320 struct cmtp_application *application; in cmtp_recv_capimsg() local
342 application = cmtp_application_get(session, CMTP_MAPPING, appl); in cmtp_recv_capimsg()
343 if (application) { in cmtp_recv_capimsg()
344 appl = application->appl; in cmtp_recv_capimsg()
347 BT_ERR("Can't find application with id %d", appl); in cmtp_recv_capimsg()
383 struct cmtp_application *application; in cmtp_register_appl() local
391 application = cmtp_application_add(session, appl); in cmtp_register_appl()
392 if (!application) { in cmtp_register_appl()
393 BT_ERR("Can't allocate memory for new application"); in cmtp_register_appl()
409 application->state = BT_CONFIG; in cmtp_register_appl()
410 application->msgnum = cmtp_msgnum_get(session); in cmtp_register_appl()
412 cmtp_send_interopmsg(session, CAPI_REQ, 0x0000, application->msgnum, in cmtp_register_appl()
424 if (application->state == BT_CLOSED) { in cmtp_register_appl()
425 err = -application->err; in cmtp_register_appl()
429 if (application->state == BT_CONNECTED) in cmtp_register_appl()
443 cmtp_application_del(session, application); in cmtp_register_appl()
451 struct cmtp_application *application; in cmtp_release_appl() local
455 application = cmtp_application_get(session, CMTP_APPLID, appl); in cmtp_release_appl()
456 if (!application) { in cmtp_release_appl()
457 BT_ERR("Can't find application"); in cmtp_release_appl()
461 application->msgnum = cmtp_msgnum_get(session); in cmtp_release_appl()
463 cmtp_send_interopmsg(session, CAPI_REQ, application->mapping, application->msgnum, in cmtp_release_appl()
467 (application->state == BT_CLOSED), CMTP_INTEROP_TIMEOUT); in cmtp_release_appl()
469 cmtp_application_del(session, application); in cmtp_release_appl()
475 struct cmtp_application *application; in cmtp_send_message() local
484 application = cmtp_application_get(session, CMTP_APPLID, appl); in cmtp_send_message()
485 if ((!application) || (application->state != BT_CONNECTED)) { in cmtp_send_message()
486 BT_ERR("Can't find application with id %d", appl); in cmtp_send_message()
490 CAPIMSG_SETAPPID(skb->data, application->mapping); in cmtp_send_message()