* [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times
@ 2013-10-27 2:56 Hangbin Liu
2013-10-30 0:54 ` Hangbin Liu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hangbin Liu @ 2013-10-27 2:56 UTC (permalink / raw)
To: linux-sctp
As client side send msg_cnt times for each repeat. Server will exit too early
if we only receive one time for each repeat and leave client keep sent, which
makes client could not exit normally
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
src/apps/sctp_status.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/apps/sctp_status.c b/src/apps/sctp_status.c
index 4e21af8..76f96e4 100644
--- a/src/apps/sctp_status.c
+++ b/src/apps/sctp_status.c
@@ -547,6 +547,8 @@ int receive_r(int sk)
} /* receive_r () */
void server(int sk) {
+ int i;
+
if (max_msgsize > DEFAULT_MAX_WINDOW) {
if (setsockopt(sk, IPPROTO_SCTP, SO_RCVBUF, &max_msgsize,
sizeof(max_msgsize)) < 0) {
@@ -555,7 +557,10 @@ void server(int sk) {
}
}
- receive_r(sk);
+ for (i = 0; i < msg_cnt; i++) {
+ receive_r(sk);
+ DEBUG_PRINT(DEBUG_MIN, "count %d\n", i+1);
+ }
} /* server() */
void * build_msg(int len) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times
2013-10-27 2:56 [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times Hangbin Liu
@ 2013-10-30 0:54 ` Hangbin Liu
2013-10-30 8:10 ` Daniel Borkmann
2013-10-30 13:39 ` Daniel Borkmann
2 siblings, 0 replies; 4+ messages in thread
From: Hangbin Liu @ 2013-10-30 0:54 UTC (permalink / raw)
To: linux-sctp
On Sun, Oct 27, 2013 at 10:56:23AM +0800, Hangbin Liu wrote:
> As client side send msg_cnt times for each repeat. Server will exit too early
> if we only receive one time for each repeat and leave client keep sent, which
> makes client could not exit normally
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> src/apps/sctp_status.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/apps/sctp_status.c b/src/apps/sctp_status.c
> index 4e21af8..76f96e4 100644
> --- a/src/apps/sctp_status.c
> +++ b/src/apps/sctp_status.c
> @@ -547,6 +547,8 @@ int receive_r(int sk)
> } /* receive_r () */
>
> void server(int sk) {
> + int i;
> +
> if (max_msgsize > DEFAULT_MAX_WINDOW) {
> if (setsockopt(sk, IPPROTO_SCTP, SO_RCVBUF, &max_msgsize,
> sizeof(max_msgsize)) < 0) {
> @@ -555,7 +557,10 @@ void server(int sk) {
> }
> }
>
> - receive_r(sk);
> + for (i = 0; i < msg_cnt; i++) {
> + receive_r(sk);
> + DEBUG_PRINT(DEBUG_MIN, "count %d\n", i+1);
> + }
> } /* server() */
>
> void * build_msg(int len) {
> --
> 1.8.1.4
>
How about this patch?
--
Thanks & Best Regards
Hangbin Liu <liuhangbin@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times
2013-10-27 2:56 [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times Hangbin Liu
2013-10-30 0:54 ` Hangbin Liu
@ 2013-10-30 8:10 ` Daniel Borkmann
2013-10-30 13:39 ` Daniel Borkmann
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2013-10-30 8:10 UTC (permalink / raw)
To: linux-sctp
On 10/30/2013 01:54 AM, Hangbin Liu wrote:
> How about this patch?
Having a look at this today, and also at the issue you
described.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times
2013-10-27 2:56 [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times Hangbin Liu
2013-10-30 0:54 ` Hangbin Liu
2013-10-30 8:10 ` Daniel Borkmann
@ 2013-10-30 13:39 ` Daniel Borkmann
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2013-10-30 13:39 UTC (permalink / raw)
To: linux-sctp
On 10/27/2013 03:56 AM, Hangbin Liu wrote:
> As client side send msg_cnt times for each repeat. Server will exit too early
> if we only receive one time for each repeat and leave client keep sent, which
> makes client could not exit normally
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Ok, applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-30 13:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27 2:56 [lksctp-developers] [PATCH] sctp_status: server side should also receive msg_cnt times Hangbin Liu
2013-10-30 0:54 ` Hangbin Liu
2013-10-30 8:10 ` Daniel Borkmann
2013-10-30 13:39 ` Daniel Borkmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.