- if (req->req == "connect" )
- {
-
- if (source->m_isBluetooth)
- {
-
- BluetoothDevice bt;
- std::string tempPort = bt.getDeviceForAddress(source->m_btDeviceAddress, source->m_btAdapterAddress);
- if(tempPort != "")
- {
- DebugOut(3)<<"Using bluetooth device \""<<source->m_btDeviceAddress<<"\" bound to: "<<tempPort<<endl;
- port = tempPort;
- }
- }
- else
- {
- port = req->arglist[0];
- baud = req->arglist[1];
- }
- connected = connect(obd,port,baud);
-
- if(connected)
- {
- StatusMessage *statusreq = new StatusMessage();
- statusreq->statusStr = "connected";
- g_async_queue_push(privStatusQueue,statusreq);
- }
- else
- {
- StatusMessage *statusreq = new StatusMessage();
- statusreq->statusStr = "disconnected";
- g_async_queue_push(privStatusQueue,statusreq);
- }
-
- }
- else if (req->req == "connectifnot")