mirror of
https://github.com/curl/curl.git
synced 2026-07-03 10:47:16 +03:00
parent
dffd996e3b
commit
a86fcb284f
5 changed files with 15 additions and 15 deletions
|
|
@ -39,7 +39,7 @@ static int ping(CURL *curl, const char *send_payload)
|
|||
return (int)result;
|
||||
}
|
||||
|
||||
static int recv_pong(CURL *curl, const char *exected_payload)
|
||||
static int recv_pong(CURL *curl, const char *expected_payload)
|
||||
{
|
||||
size_t rlen;
|
||||
const struct curl_ws_frame *meta;
|
||||
|
|
@ -49,8 +49,8 @@ static int recv_pong(CURL *curl, const char *exected_payload)
|
|||
if(meta->flags & CURLWS_PONG) {
|
||||
int same = 0;
|
||||
fprintf(stderr, "ws: got PONG back\n");
|
||||
if(rlen == strlen(exected_payload)) {
|
||||
if(!memcmp(exected_payload, buffer, rlen)) {
|
||||
if(rlen == strlen(expected_payload)) {
|
||||
if(!memcmp(expected_payload, buffer, rlen)) {
|
||||
fprintf(stderr, "ws: got the same payload back\n");
|
||||
same = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static CURLcode ping(CURL *curl, const char *send_payload)
|
|||
return result;
|
||||
}
|
||||
|
||||
static CURLcode recv_pong(CURL *curl, const char *exected_payload)
|
||||
static CURLcode recv_pong(CURL *curl, const char *expected_payload)
|
||||
{
|
||||
size_t rlen;
|
||||
const struct curl_ws_frame *meta;
|
||||
|
|
@ -71,8 +71,8 @@ static CURLcode recv_pong(CURL *curl, const char *exected_payload)
|
|||
}
|
||||
|
||||
fprintf(stderr, "ws: got PONG back\n");
|
||||
if(rlen == strlen(exected_payload) &&
|
||||
!memcmp(exected_payload, buffer, rlen)) {
|
||||
if(rlen == strlen(expected_payload) &&
|
||||
!memcmp(expected_payload, buffer, rlen)) {
|
||||
fprintf(stderr, "ws: got the same payload back\n");
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static int ping(CURL *curl, const char *send_payload)
|
|||
return (int)result;
|
||||
}
|
||||
|
||||
static int recv_pong(CURL *curl, const char *exected_payload)
|
||||
static int recv_pong(CURL *curl, const char *expected_payload)
|
||||
{
|
||||
size_t rlen;
|
||||
unsigned int rflags;
|
||||
|
|
@ -48,8 +48,8 @@ static int recv_pong(CURL *curl, const char *exected_payload)
|
|||
if(rflags & CURLWS_PONG) {
|
||||
int same = 0;
|
||||
fprintf(stderr, "ws: got PONG back\n");
|
||||
if(rlen == strlen(exected_payload)) {
|
||||
if(!memcmp(exected_payload, buffer, rlen)) {
|
||||
if(rlen == strlen(expected_payload)) {
|
||||
if(!memcmp(expected_payload, buffer, rlen)) {
|
||||
fprintf(stderr, "ws: got the same payload back\n");
|
||||
same = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static int ping(CURL *curl, const char *send_payload)
|
|||
return (int)result;
|
||||
}
|
||||
|
||||
static int recv_pong(CURL *curl, const char *exected_payload)
|
||||
static int recv_pong(CURL *curl, const char *expected_payload)
|
||||
{
|
||||
size_t rlen;
|
||||
unsigned int rflags;
|
||||
|
|
@ -49,8 +49,8 @@ static int recv_pong(CURL *curl, const char *exected_payload)
|
|||
if(rflags & CURLWS_PONG) {
|
||||
int same = 0;
|
||||
fprintf(stderr, "ws: got PONG back\n");
|
||||
if(rlen == strlen(exected_payload)) {
|
||||
if(!memcmp(exected_payload, buffer, rlen)) {
|
||||
if(rlen == strlen(expected_payload)) {
|
||||
if(!memcmp(expected_payload, buffer, rlen)) {
|
||||
fprintf(stderr, "ws: got the same payload back\n");
|
||||
same = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static int ping(CURL *curl, const char *send_payload)
|
|||
return (int)result;
|
||||
}
|
||||
|
||||
static int recv_pong(CURL *curl, const char *exected_payload)
|
||||
static int recv_pong(CURL *curl, const char *expected_payload)
|
||||
{
|
||||
size_t rlen;
|
||||
const struct curl_ws_frame *meta;
|
||||
|
|
@ -48,8 +48,8 @@ static int recv_pong(CURL *curl, const char *exected_payload)
|
|||
if(meta->flags & CURLWS_PONG) {
|
||||
int same = 0;
|
||||
fprintf(stderr, "ws: got PONG back\n");
|
||||
if(rlen == strlen(exected_payload)) {
|
||||
if(!memcmp(exected_payload, buffer, rlen)) {
|
||||
if(rlen == strlen(expected_payload)) {
|
||||
if(!memcmp(expected_payload, buffer, rlen)) {
|
||||
fprintf(stderr, "ws: got the same payload back\n");
|
||||
same = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue