equal
deleted
inserted
replaced
277 // On return, _should_ contain a free RFCOMM port |
277 // On return, _should_ contain a free RFCOMM port |
278 err = iListener.Bind(addr); |
278 err = iListener.Bind(addr); |
279 |
279 |
280 if(err) |
280 if(err) |
281 { |
281 { |
282 TInt freeChnl; |
|
283 err = iListener.GetOpt(KRFCOMMGetAvailableServerChannel, KSolBtRFCOMM, freeChnl); |
|
284 if (err == KErrNone) |
|
285 { |
|
286 err = iListener.SetLocalPort(freeChnl); |
|
287 iChannel = freeChnl; |
|
288 } |
|
289 } |
|
290 if(err) |
|
291 { |
|
292 // Try to bind using KRfcommPassiveAutoBind |
282 // Try to bind using KRfcommPassiveAutoBind |
293 iChannel = KRfcommPassiveAutoBind; |
283 iChannel = KRfcommPassiveAutoBind; |
294 addr.SetPort(iChannel); |
284 addr.SetPort(iChannel); |
295 err = iListener.Bind(addr); |
285 err = iListener.Bind(addr); |
296 } |
286 } |