summaryrefslogtreecommitdiffstats
path: root/obex
diff options
context:
space:
mode:
Diffstat (limited to 'obex')
-rw-r--r--obex/javax/obex/ServerOperation.java6
-rw-r--r--obex/javax/obex/ServerSession.java8
2 files changed, 7 insertions, 7 deletions
diff --git a/obex/javax/obex/ServerOperation.java b/obex/javax/obex/ServerOperation.java
index 8710c64..504fe35 100644
--- a/obex/javax/obex/ServerOperation.java
+++ b/obex/javax/obex/ServerOperation.java
@@ -169,10 +169,10 @@ public final class ServerOperation implements Operation, BaseStream {
mHasBody = true;
}
- if (requestHeader.mConnectionID != null) {
+ if (mListener.getConnectionId() != -1 && requestHeader.mConnectionID != null) {
mListener.setConnectionId(ObexHelper.convertToLong(requestHeader.mConnectionID));
} else {
- mListener.setConnectionId(0);
+ mListener.setConnectionId(1);
}
if (requestHeader.mAuthResp != null) {
@@ -438,7 +438,7 @@ public final class ServerOperation implements Operation, BaseStream {
if (body != null) {
mHasBody = true;
}
- if (requestHeader.mConnectionID != null) {
+ if (mListener.getConnectionId() != -1 && requestHeader.mConnectionID != null) {
mListener.setConnectionId(ObexHelper
.convertToLong(requestHeader.mConnectionID));
} else {
diff --git a/obex/javax/obex/ServerSession.java b/obex/javax/obex/ServerSession.java
index 675272d..aca90bb 100644
--- a/obex/javax/obex/ServerSession.java
+++ b/obex/javax/obex/ServerSession.java
@@ -283,10 +283,10 @@ public final class ServerSession extends ObexSession implements Runnable {
ObexHelper.updateHeaderSet(request, headers);
- if (request.mConnectionID != null) {
+ if (mListener.getConnectionId() != -1 && request.mConnectionID != null) {
mListener.setConnectionId(ObexHelper.convertToLong(request.mConnectionID));
} else {
- mListener.setConnectionId(-1);
+ mListener.setConnectionId(1);
}
// the Auth chan is initiated by the server, client sent back the authResp .
if (request.mAuthResp != null) {
@@ -405,7 +405,7 @@ public final class ServerSession extends ObexSession implements Runnable {
ObexHelper.updateHeaderSet(request, headers);
}
- if (request.mConnectionID != null) {
+ if (mListener.getConnectionId() != -1 && request.mConnectionID != null) {
mListener.setConnectionId(ObexHelper.convertToLong(request.mConnectionID));
} else {
mListener.setConnectionId(1);
@@ -527,7 +527,7 @@ public final class ServerSession extends ObexSession implements Runnable {
ObexHelper.updateHeaderSet(request, headers);
}
- if (request.mConnectionID != null) {
+ if (mListener.getConnectionId() != -1 && request.mConnectionID != null) {
mListener.setConnectionId(ObexHelper.convertToLong(request.mConnectionID));
} else {
mListener.setConnectionId(1);