diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-01-19 16:58:35 +0200 |
---|---|---|
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-01-20 16:23:21 +0200 |
commit | 088289ec28ddc25e45ef179476057b72e140b0a5 (patch) | |
tree | c65beb84dd7ffec761df76971e69e405a6800990 /include | |
parent | 724aa3ffbd8ddf29766b00e804941b7c718af8e0 (diff) |
net: context: Add status to connect callback
It is useful that the user API can know whether the connection
was established properly or not. So this commit adds status
parameter to connect callback in net_context API.
The call to connect callback needs to be set properly in TCP
code. This commit does not fix the connect callback call which
is not properly done right now in net_context.c.
Change-Id: I284a60ddd658ceef9e65022e96591f467a936a09
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/net_context.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/net_context.h b/include/net/net_context.h index ce2e83517..6188145aa 100644 --- a/include/net/net_context.h +++ b/include/net/net_context.h @@ -446,9 +446,13 @@ int net_context_listen(struct net_context *context, * established. * * @param context The context to use. + * @param status Status of the connection establishment. This is 0 + * if the connection was established successfully, <0 if there was an + * error. * @param user_data The user data given in net_context_connect() call. */ typedef void (*net_context_connect_cb_t)(struct net_context *context, + int status, void *user_data); /** |