aboutsummaryrefslogtreecommitdiffstats
path: root/src/sap/client.rb
diff options
context:
space:
mode:
authorKevin Redon <kevredon@mail.tsaitgaist.info>2011-05-16 12:54:14 +0200
committerKevin Redon <kevredon@mail.tsaitgaist.info>2011-05-16 12:54:14 +0200
commit5fd5f513492a309ba948857954d9d92df1c31426 (patch)
tree94ecd445aac9dd12609c8ef383bca4dce3b6e65e /src/sap/client.rb
parentd7185ee323ee99f35e0576d35a77e131929b1110 (diff)
concurrent access bug corrected
Diffstat (limited to 'src/sap/client.rb')
-rw-r--r--src/sap/client.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sap/client.rb b/src/sap/client.rb
index e3d0551..fdef683 100644
--- a/src/sap/client.rb
+++ b/src/sap/client.rb
@@ -90,7 +90,7 @@ class Client < SAP
# verify response
if connection_status==0x00 then
# OK, Server can fulfill requirements
- log("client","connected",3)
+ log("client","connected to server",3)
set_state :idle
elsif connection_status==0x02 and message[:payload].size==2 then
# Error, Server does not support maximum message size
@@ -107,7 +107,7 @@ class Client < SAP
@end=true
when "STATUS_IND"
status = message[:payload][0][:value][0]
- log("client","new status : #{STATUS_CHANGE[status]}",3)
+ log("client","new card status : #{STATUS_CHANGE[status]}",3)
if status==0x01 then
# card reset
@sim_ok = true
@@ -153,7 +153,7 @@ class Client < SAP
connect = create_message("CONNECT_REQ",payload)
send(connect)
set_state :connection_under_negociation
- elsif @state!=:connection_under_negociation
+ elsif @state!=:connection_under_negociation and @state!=:idle
raise "can not connect. required state : not_connected, current state : #{@state}"
return false
end