projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Memory leak fixes.
[silc.git]
/
lib
/
silcske
/
silcconnauth.c
diff --git
a/lib/silcske/silcconnauth.c
b/lib/silcske/silcconnauth.c
index 6947095b880f899a48bcb62a70a26918ea55b8f4..b5e59ab53af9cf37539b2763d1471f2555f23b0d 100644
(file)
--- a/
lib/silcske/silcconnauth.c
+++ b/
lib/silcske/silcconnauth.c
@@
-32,6
+32,7
@@
static SilcBool silc_connauth_packet_receive(SilcPacketEngine engine,
struct SilcConnAuthStruct {
SilcSKE ske;
SilcFSM fsm;
struct SilcConnAuthStruct {
SilcSKE ske;
SilcFSM fsm;
+ SilcAsyncOperationStruct op;
SilcConnectionType conn_type;
SilcAuthMethod auth_method;
void *auth_data;
SilcConnectionType conn_type;
SilcAuthMethod auth_method;
void *auth_data;
@@
-395,8
+396,6
@@
silc_connauth_initiator(SilcConnAuth connauth,
SilcConnAuthCompletion completion,
void *context)
{
SilcConnAuthCompletion completion,
void *context)
{
- SilcAsyncOperation op;
-
SILC_LOG_DEBUG(("Connection authentication as initiator"));
if (auth_method == SILC_AUTH_PASSWORD && !auth_data) {
SILC_LOG_DEBUG(("Connection authentication as initiator"));
if (auth_method == SILC_AUTH_PASSWORD && !auth_data) {
@@
-423,10
+422,10
@@
silc_connauth_initiator(SilcConnAuth connauth,
SILC_PACKET_FAILURE, -1);
/* Start the protocol */
SILC_PACKET_FAILURE, -1);
/* Start the protocol */
-
op = silc_async_alloc(
silc_connauth_abort, NULL, connauth);
+
silc_async_init(&connauth->op,
silc_connauth_abort, NULL, connauth);
silc_fsm_start(connauth->fsm, silc_connauth_st_initiator_start);
silc_fsm_start(connauth->fsm, silc_connauth_st_initiator_start);
- return op;
+ return
&connauth->
op;
}
}
@@
-684,8
+683,6
@@
silc_connauth_responder(SilcConnAuth connauth,
SilcConnAuthCompletion completion,
void *context)
{
SilcConnAuthCompletion completion,
void *context)
{
- SilcAsyncOperation op;
-
SILC_LOG_DEBUG(("Connection authentication as responder"));
connauth->get_auth_data = get_auth_data;
SILC_LOG_DEBUG(("Connection authentication as responder"));
connauth->get_auth_data = get_auth_data;
@@
-699,8
+696,8
@@
silc_connauth_responder(SilcConnAuth connauth,
SILC_PACKET_FAILURE, -1);
/* Start the protocol */
SILC_PACKET_FAILURE, -1);
/* Start the protocol */
-
op = silc_async_alloc(
silc_connauth_abort, NULL, connauth);
+
silc_async_init(&connauth->op,
silc_connauth_abort, NULL, connauth);
silc_fsm_start(connauth->fsm, silc_connauth_st_responder_start);
silc_fsm_start(connauth->fsm, silc_connauth_st_responder_start);
- return op;
+ return
&connauth->
op;
}
}