Skip to content

Commit

Permalink
cicd : updated sctp_client for sctp-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Jun 21, 2024
1 parent 64bea00 commit 2025327
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Binary file modified cicd/common/sctp_socat_client
Binary file not shown.
13 changes: 5 additions & 8 deletions cicd/common/sctp_socat_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <unistd.h>
#include <errno.h>

#define RECVBUFSIZE 4096
#define RECVBUFSIZE 1024
#define PPID 1234

int main(int argc, char* argv[])
Expand All @@ -24,8 +24,7 @@ int main(int argc, char* argv[])
struct sctp_sndrcvinfo sndrcvinfo = {0};
struct sctp_event_subscribe events = {0};
struct sctp_initmsg initmsg = {0};
char msg[1024] = {0};
char buff[1024] = {0};
char msg[RECVBUFSIZE] = {0};
socklen_t opt_len;
socklen_t slen = (socklen_t) sizeof(struct sockaddr_in);

Expand Down Expand Up @@ -56,13 +55,11 @@ int main(int argc, char* argv[])

while(1)
{
in = sctp_recvmsg(sockfd, (void*)buff, RECVBUFSIZE,
(struct sockaddr *)&servaddr,
&slen, &sndrcvinfo, &flags);
in = recv(sockfd, (void*)msg, RECVBUFSIZE, 0);
if (in > 0 && in < RECVBUFSIZE - 1)
{
buff[in] = 0;
printf("%s",buff);
msg[in] = 0;
printf("%s",msg);
break;
}
}
Expand Down

0 comments on commit 2025327

Please sign in to comment.