Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
93926e90
Commit
93926e90
authored
Nov 18, 2016
by
manuroe
Browse files
OLMKit: Fixed warnings in objc wrapper
parent
29de7825
Changes
2
Show whitespace changes
Inline
Side-by-side
xcode/OLMKit/OLMAccount.m
View file @
93926e90
...
...
@@ -74,7 +74,7 @@
return
self
;
}
-
(
size_t
)
maxOneTimeKeys
{
-
(
NSUInteger
)
maxOneTimeKeys
{
return
olm_account_max_number_of_one_time_keys
(
_account
);
}
...
...
@@ -156,7 +156,7 @@
-
(
BOOL
)
removeOneTimeKeysForSession
:(
OLMSession
*
)
session
{
NSParameterAssert
(
session
!=
nil
);
if
(
!
session
)
{
return
nil
;
return
NO
;
}
size_t
result
=
olm_remove_one_time_keys
(
self
.
account
,
session
.
session
);
if
(
result
==
olm_error
())
{
...
...
xcode/OLMKit/OLMSession.m
View file @
93926e90
...
...
@@ -167,9 +167,9 @@
}
-
(
BOOL
)
matchesInboundSession
:(
NSString
*
)
oneTimeKeyMessage
{
NSData
*
otk
=
[
oneTimeKeyMessage
dataUsingEncoding
:
NSUTF8StringEncoding
];
NS
Mutable
Data
*
otk
=
[
NSMutableData
dataWithData
:
[
oneTimeKeyMessage
dataUsingEncoding
:
NSUTF8StringEncoding
]
]
;
size_t
result
=
olm_matches_inbound_session
(
_session
,
otk
.
b
ytes
,
otk
.
length
);
size_t
result
=
olm_matches_inbound_session
(
_session
,
otk
.
mutableB
ytes
,
otk
.
length
);
if
(
result
==
1
)
{
return
YES
;
}
...
...
@@ -184,11 +184,11 @@
-
(
BOOL
)
matchesInboundSessionFrom
:(
NSString
*
)
theirIdentityKey
oneTimeKeyMessage
:(
NSString
*
)
oneTimeKeyMessage
{
NSData
*
idKey
=
[
theirIdentityKey
dataUsingEncoding
:
NSUTF8StringEncoding
];
NSData
*
otk
=
[
oneTimeKeyMessage
dataUsingEncoding
:
NSUTF8StringEncoding
];
NS
Mutable
Data
*
otk
=
[
NSMutableData
dataWithData
:
[
oneTimeKeyMessage
dataUsingEncoding
:
NSUTF8StringEncoding
]
]
;
size_t
result
=
olm_matches_inbound_session_from
(
_session
,
idKey
.
bytes
,
idKey
.
length
,
otk
.
b
ytes
,
otk
.
length
);
otk
.
mutableB
ytes
,
otk
.
length
);
if
(
result
==
1
)
{
return
YES
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment