summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
authorwimpie <wimpie>2005-01-09 00:32:10 (UTC)
committer wimpie <wimpie>2005-01-09 00:32:10 (UTC)
commite54346d28b19d3ac671802a25e8c03f346693291 (patch) (side-by-side diff)
tree0f8d6561e24a7ba36fd8a6ab1869aa470e1fdb36 /noncore/settings/networksettings2/opietooth2/OTPeer.cpp
parent60a617583d0ccc793d9ea4465998d90ec208db58 (diff)
downloadopie-e54346d28b19d3ac671802a25e8c03f346693291.zip
opie-e54346d28b19d3ac671802a25e8c03f346693291.tar.gz
opie-e54346d28b19d3ac671802a25e8c03f346693291.tar.bz2
Updated dependencies
NS2->app requires OT2Lib and NS2Lib OT2Lib requires NS2Lib Most plugins only require NS2Lib Except BTPlugin which requires als OT2Lib Also renamed owarn -> odebug
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTPeer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTPeer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTPeer.cpp b/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
index 0d7e943..2272f04 100644
--- a/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
@@ -48,20 +48,20 @@ OTPeer::~OTPeer( ) {
void OTPeer::updateServices( void ) {
sdp_session_t *session;
serviceList.clear();
- owarn << "Get services from " << Addr.toString() << oendl;
+ odebug << "Get services from " << Addr.toString() << oendl;
session = sdp_connect( &(OTDeviceAddress::any.getBDAddr()),
&(Addr.getBDAddr()),
0);
if (!session) {
- owarn << "sdp_connect("
+ odebug << "sdp_connect("
<< Addr.toString()
<< ") failed"
<< oendl;
return; // error
}
@@ -77,13 +77,13 @@ void OTPeer::updateServices( void ) {
sdp_list_t* seq;
if (sdp_service_search_attr_req( session,
search,
SDP_ATTR_REQ_RANGE,
attrId,
&seq ) ) {
- owarn << "Service Search failed" << oendl;
+ odebug << "Service Search failed" << oendl;
sdp_close(session);
return;
}
sdp_list_free(attrId, 0);
sdp_list_free(search, 0);
@@ -174,13 +174,13 @@ void OTPeer::findOutState( int timeoutInSec, bool Force ) {
State = OTPeer::Peer_Unknown;
} // else keep state or is connected to us
if( State == OTPeer::Peer_Unknown ) {
ProbePhase = 0;
ProbeTimeout = timeoutInSec*1000;
- owarn << "Ping " << address().toString() << oendl;
+ odebug << "Ping " << address().toString() << oendl;
startTimer( POLLDELAY );
} else {
ProbeTimeout = 0;
startTimer( 0 );
}
}
@@ -232,13 +232,13 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
char buf[L2CAP_CMD_HDR_SIZE + PINGSIZE + 20];
int n;
pf[0].fd = ProbeFD;
pf[0].events = POLLOUT;
if( (n = ::poll(pf, 1, 0)) < 0 ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
<< errno
<< " "
<< strerror(errno)<<oendl;
ProbeTimeout = 0;
break;
@@ -263,23 +263,23 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
/* Send Echo Request */
if( ::send(ProbeFD, buf, PINGSIZE + L2CAP_CMD_HDR_SIZE, 0) <= 0) {
if( errno == EACCES ) {
// permission denied means that we could not
// connect because the device does not allow us
// but it is UP
- owarn << address().toString()
+ odebug << address().toString()
<< " good send error "
<< errno
<< " "
<< strerror( errno)
<< oendl;
State = OTPeer::Peer_Up;
ProbeTimeout = 0;
break;
} else if( errno != EBUSY ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
<< errno
<< " "
<< strerror(errno)
<< oendl;
ProbeTimeout = 0;
@@ -296,13 +296,13 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
l2cap_cmd_hdr *cmd = (l2cap_cmd_hdr *) buf;
int n;
pf[0].fd = ProbeFD;
pf[0].events = POLLIN;
if( (n = ::poll(pf, 1, 0)) < 0 ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
<< errno
<< " "
<< strerror(errno)
<<oendl;
ProbeTimeout = 0;
@@ -312,13 +312,13 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
if( ! n ) {
// not ready -> try again
break;
}
if( (n = ::recv( ProbeFD, buf, sizeof(buf), 0)) < 0) {
- owarn << address().toString()
+ odebug << address().toString()
<< "errno "
<< errno
<< " "
<< strerror(errno)
<< oendl;
ProbeTimeout = 0;
@@ -327,13 +327,13 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
/* Check for our id */
if( cmd->ident != *(char *)this )
// not our reply
break;
- owarn << "reply from "
+ odebug << "reply from "
<< address().toString()
<< oendl;
// whatever reply we get is a valid reply
State = OTPeer::Peer_Up;
ProbeTimeout = 0;
}