projects
/
runtime.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added SILC errno API. Added SilcResult, generic error code and
[runtime.git]
/
lib
/
silcutil
/
silcfsm.c
diff --git
a/lib/silcutil/silcfsm.c
b/lib/silcutil/silcfsm.c
index d87e0406cd5d83b14f4c34c8d0e8104899dfa04e..3cef6d969506a8f374feb54fdcb5e3a89029b0cf 100644
(file)
--- a/
lib/silcutil/silcfsm.c
+++ b/
lib/silcutil/silcfsm.c
@@
-58,8
+58,10
@@
SilcBool silc_fsm_init(SilcFSM fsm,
void *destructor_context,
SilcSchedule schedule)
{
void *destructor_context,
SilcSchedule schedule)
{
- if (!schedule)
+ if (!schedule) {
+ silc_set_errno(SILC_ERR_INVALID_ARGUMENT);
return FALSE;
return FALSE;
+ }
fsm->fsm_context = fsm_context;
fsm->state_context = NULL;
fsm->fsm_context = fsm_context;
fsm->state_context = NULL;
@@
-481,7
+483,7
@@
SILC_TASK_CALLBACK(silc_fsm_finish_fsm)
} else {
/* Machine must not have active threads */
} else {
/* Machine must not have active threads */
-
assert
(silc_atomic_get_int32(&fsm->u.m.threads) == 0);
+
SILC_VERIFY
(silc_atomic_get_int32(&fsm->u.m.threads) == 0);
if (fsm->u.m.lock) {
silc_mutex_free(fsm->u.m.lock);
if (fsm->u.m.lock) {
silc_mutex_free(fsm->u.m.lock);