def xmpp_logout(self):
        print "xmpp_logout start!!!!!!!!!!!!"
        # subscribe
        mqtt.c_sub_xmpp_logout_res(self.mqtt_client, login_test_jid1, self.handle_xmpp_logout_res)

        # publish
        mqtt.c_pub_xmpp_logout_req(self.mqtt_client, mxadap_host, self.mxid)
    def xmpp_logout(self):
        global xmpp_logout_has_req
        if xmpp_logout_has_req:
            print "xmpp_logout recall !!!!!!!"
            return

        print "xmpp_logout start!!!!!!!!!!!!"
        # subscribe
        mqtt.c_sub_xmpp_logout_res(mqtt_client1, mqtt_jid1, self.handle_xmpp_logout_res1)
        mqtt.c_sub_xmpp_logout_res(mqtt_client2, mqtt_jid2, self.handle_xmpp_logout_res2)

        # publish
        mqtt.c_pub_xmpp_logout_req(mqtt_client1, mxadap_host, mxid1)
        mqtt.c_pub_xmpp_logout_req(mqtt_client2, mxadap_host, mxid2)

        xmpp_logout_has_req = True