From: <svn...@op...> - 2009-08-10 09:25:53
|
Author: bellmich Date: Mon Aug 10 11:25:40 2009 New Revision: 1253 URL: http://libsyncml.opensync.org/changeset/1253 Log: fixed minor issues of the state handling Modified: trunk/libsyncml/transports/obex_client.c Modified: trunk/libsyncml/transports/obex_client.c ============================================================================== --- trunk/libsyncml/transports/obex_client.c Mon Aug 10 11:14:18 2009 (r1252) +++ trunk/libsyncml/transports/obex_client.c Mon Aug 10 11:25:40 2009 (r1253) @@ -1191,7 +1191,7 @@ "The disconnect request was not accepted (%i).", result); goto error; - } else if (result == 0 && !env->busy && env->state < SML_TRANSPORT_DISCONNECTED) { + } else if (result == 0 && !env->busy && env->state != SML_TRANSPORT_DISCONNECTED) { g_set_error(&error, SML_ERROR, SML_ERROR_GENERIC, "The disconnect request was timed out."); goto error; @@ -1206,8 +1206,7 @@ /* Note: The disconnect is signaled by OBEX_EV_LINKERR or OBEX_CMD_DISCONNECT. * We only signal disconnect here if a phone does not answer. */ - if (SML_TRANSPORT_CONNECTED <= env->state && - env->state < SML_TRANSPORT_DISCONNECTED) + if (env->state < SML_TRANSPORT_DISCONNECTED) { env->busy = FALSE; OBEX_TransportDisconnect(env->obexhandle); |