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
example of integration with websocket in C
[src/app-framework-binder.git]
/
src
/
afb-context.c
diff --git
a/src/afb-context.c
b/src/afb-context.c
index
2f391de
..
62f1f06
100644
(file)
--- a/
src/afb-context.c
+++ b/
src/afb-context.c
@@
-23,8
+23,7
@@
#include "session.h"
#include "afb-context.h"
#include "session.h"
#include "afb-context.h"
-
-void afb_context_init(struct afb_context *context, struct AFB_clientCtx *session, const char *token)
+static void init_context(struct afb_context *context, struct AFB_clientCtx *session, const char *token)
{
assert(session != NULL);
{
assert(session != NULL);
@@
-42,6
+41,11
@@
void afb_context_init(struct afb_context *context, struct AFB_clientCtx *session
}
}
}
}
+void afb_context_init(struct afb_context *context, struct AFB_clientCtx *session, const char *token)
+{
+ init_context(context, ctxClientAddRef(session), token);
+}
+
int afb_context_connect(struct afb_context *context, const char *uuid, const char *token)
{
int created;
int afb_context_connect(struct afb_context *context, const char *uuid, const char *token)
{
int created;
@@
-50,7
+54,7
@@
int afb_context_connect(struct afb_context *context, const char *uuid, const cha
session = ctxClientGetSession (uuid, &created);
if (session == NULL)
return -1;
session = ctxClientGetSession (uuid, &created);
if (session == NULL)
return -1;
-
afb_context_ini
t(context, session, token);
+
init_contex
t(context, session, token);
if (created)
context->created = 1;
return 0;
if (created)
context->created = 1;
return 0;