Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
DBus binding: first draft
[src/app-framework-binder.git]
/
src
/
afb-context.c
diff --git
a/src/afb-context.c
b/src/afb-context.c
index
a7010db
..
ba093c3
100644
(file)
--- a/
src/afb-context.c
+++ b/
src/afb-context.c
@@
-58,7
+58,7
@@
int afb_context_connect(struct afb_context *context, const char *uuid, const cha
init_context(context, session, token);
if (created) {
context->created = 1;
init_context(context, session, token);
if (created) {
context->created = 1;
- context->refreshing = 1;
+ /* context->refreshing = 1; */
}
return 0;
}
}
return 0;
}
@@
-138,16
+138,19
@@
int afb_context_check_loa(struct afb_context *context, unsigned loa)
return context->loa_in >= loa;
}
return context->loa_in >= loa;
}
-
void
afb_context_change_loa(struct afb_context *context, unsigned loa)
+
int
afb_context_change_loa(struct afb_context *context, unsigned loa)
{
{
- assert(context->validated);
+ if (!context->validated || loa > 7)
+ return 0;
- if (loa == context->loa_in)
+ if (loa == context->loa_in
&& !context->loa_changed
)
context->loa_changing = 0;
else {
context->loa_changing = 0;
else {
- context->loa_changing = 1;
context->loa_out = loa & 7;
context->loa_out = loa & 7;
+ context->loa_changing = 1;
+ context->loa_changed = 0;
}
}
+ return 1;
}
}