From: Andy Green Date: Tue, 12 Feb 2013 02:15:25 +0000 (+0800) Subject: api remove hangup_on_client X-Git-Tag: accepted/2.0/20130307.220733~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1fa4f06d32d49d29d31edf21a088fb8acd5a763;p=profile%2Fivi%2Flibwebsockets.git api remove hangup_on_client Signed-off-by: Andy Green --- diff --git a/changelog b/changelog index cd789c3..19db24a 100644 --- a/changelog +++ b/changelog @@ -78,6 +78,10 @@ User api removals and have been removed. There's a new header management scheme that handles them in a much more compact way. + - libwebsockets_hangup_on_client() is removed. If you want to close the + connection you must do so from the user callback and by returning + -1 from there. + New features ------------ diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index c905d83..6afec96 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -424,27 +424,6 @@ just_kill_connection: } /** - * libwebsockets_hangup_on_client() - Server calls to terminate client - * connection - * @context: libwebsockets context - * @fd: Connection socket descriptor - */ - -void -libwebsockets_hangup_on_client(struct libwebsocket_context *context, int fd) -{ - struct libwebsocket *wsi = context->lws_lookup[fd]; - - if (wsi) { - lwsl_info("close connection at hangup_on_client:\n"); - libwebsocket_close_and_free_session(context, - wsi, LWS_CLOSE_STATUS_NOSTATUS); - } else - close(fd); -} - - -/** * libwebsockets_get_peer_addresses() - Get client address information * @context: Libwebsockets context * @wsi: Local struct libwebsocket associated with diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 3a37b4f..db95fe8 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -918,9 +918,6 @@ libwebsockets_get_peer_addresses(struct libwebsocket_context *context, char *rip, int rip_len); LWS_EXTERN void -libwebsockets_hangup_on_client(struct libwebsocket_context *context, int fd); - -LWS_EXTERN void libwebsocket_close_and_free_session(struct libwebsocket_context *context, struct libwebsocket *wsi, enum lws_close_status); diff --git a/libwebsockets-api-doc.html b/libwebsockets-api-doc.html index 5839ac9..17d9e5b 100644 --- a/libwebsockets-api-doc.html +++ b/libwebsockets-api-doc.html @@ -102,19 +102,6 @@ representing the library version followed by the git head hash it was built from
-

libwebsockets_hangup_on_client - Server calls to terminate client connection

-void -libwebsockets_hangup_on_client -(struct libwebsocket_context * context, -int fd) -

Arguments

-
-
context -
libwebsockets context -
fd -
Connection socket descriptor -
-

libwebsockets_get_peer_addresses - Get client address information

void libwebsockets_get_peer_addresses