|
@@ -292,12 +292,14 @@ class SRIConnection(asyncio.Protocol):
|
|
|
|
|
|
user = mdb.get_one('UserInfo', {'username': object.account})
|
|
|
name = ''
|
|
|
+ uuid = ''
|
|
|
if not user:
|
|
|
ret = False
|
|
|
elif not check_password_hash(user['password'], object.password):
|
|
|
ret = False
|
|
|
else:
|
|
|
name = user.get('name')
|
|
|
+ uuid = str(user.get('_id'))
|
|
|
ret = True
|
|
|
|
|
|
|
|
@@ -308,6 +310,7 @@ class SRIConnection(asyncio.Protocol):
|
|
|
'uid': 3,
|
|
|
'name': object.account,
|
|
|
'egotype': 1,
|
|
|
+ 'user_uuid': uuid,
|
|
|
}
|
|
|
|
|
|
|
|
@@ -315,7 +318,7 @@ class SRIConnection(asyncio.Protocol):
|
|
|
object.ret = ret
|
|
|
object.uid = self.connection_id
|
|
|
object.name = name
|
|
|
- object.user_uuid = str(user.get('_id'))
|
|
|
+ object.user_uuid = uuid
|
|
|
re_command_id = protobuf.SC_Sign
|
|
|
re_body_length = object.ByteSize()
|
|
|
re_head_data = struct.pack(self.head_sequence, re_command_id, re_body_length)
|
|
@@ -580,7 +583,7 @@ class SRIConnection(asyncio.Protocol):
|
|
|
|
|
|
def message2014(self, body_data):
|
|
|
|
|
|
-
|
|
|
+
|
|
|
"""
|
|
|
message CSState
|
|
|
{
|
|
@@ -623,7 +626,7 @@ class SRIConnection(asyncio.Protocol):
|
|
|
Leave.egotype: int32
|
|
|
"""
|
|
|
o3 = protobuf.UserActivityInfo()
|
|
|
- o3.user_uuid = 'SSGGSSEEFFHHWWSS'
|
|
|
+ o3.user_uuid = self.client_info.get('user_uuid')
|
|
|
o3.cockpit_id = self.connection_id
|
|
|
o3.vehicle_id = o1.uid
|
|
|
re_command_id = protobuf.S2V_SendUserInfo
|