summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2026-07-26 14:56:53 +0500
committerVladislav Grishenko <themiron@mail.ru>2026-08-02 19:36:00 +0500
commite9df37a8518548a6de415909eb90466d7a836f5e (patch)
tree3b7c56823fb07039cd483a431bd76108cb7c89c0
parentf536d692fc1b70d82f7e14a49574066cc3121b28 (diff)
downloadaccel-ppp-e9df37a8518548a6de415909eb90466d7a836f5e.tar.gz
accel-ppp-e9df37a8518548a6de415909eb90466d7a836f5e.zip
Revert "Fixes the issue #124 HTTP replay for non SSTP query"
Reverts 635ab1b7, e7a03684, 382b02b6, 4fbba471 on accel-pppd/ctrl/sstp/sstp.c: - http_send_response: sstp_send(buf) || sstp_write(&hnd) -> sstp_send(buf) - http_handler: drop the r/return 1 path - sstp_read: drop else if (n > 0) return 1 - remove the sstp_write forward decl
-rw-r--r--accel-pppd/ctrl/sstp/sstp.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c
index 1ab08a14..8203a1f0 100644
--- a/accel-pppd/ctrl/sstp/sstp.c
+++ b/accel-pppd/ctrl/sstp/sstp.c
@@ -193,7 +193,6 @@ static mempool_t conn_pool;
static inline void sstp_queue(struct sstp_conn_t *conn, struct buffer_t *buf);
static int sstp_send(struct sstp_conn_t *conn, struct buffer_t *buf);
static inline void sstp_queue_deferred(struct sstp_conn_t *conn, struct buffer_t *buf);
-static int sstp_write(struct triton_md_handler_t *h);
static int sstp_read_deferred(struct sstp_conn_t *conn);
static int sstp_abort(struct sstp_conn_t *conn, int disconnect);
static void sstp_disconnect(struct sstp_conn_t *conn);
@@ -895,7 +894,7 @@ static int http_send_response(struct sstp_conn_t *conn, char *proto, char *statu
}
}
- return sstp_send(conn, buf) || sstp_write(&conn->hnd);
+ return sstp_send(conn, buf);
}
static int http_recv_request(struct sstp_conn_t *conn, uint8_t *data, int len)
@@ -974,7 +973,7 @@ static int http_handler(struct sstp_conn_t *conn, struct buffer_t *buf)
static const char *table[] = { "\n\r\n", "\r\r\n", NULL };
const char **pptr;
uint8_t *ptr, *end = NULL;
- int n, r;
+ int n;
if (conn->sstp_state != STATE_SERVER_CALL_DISCONNECTED)
return -1;
@@ -1000,11 +999,8 @@ static int http_handler(struct sstp_conn_t *conn, struct buffer_t *buf)
} else
n = end - buf->head;
- r = http_recv_request(conn, buf->head, n);
- if (r < 0)
+ if (http_recv_request(conn, buf->head, n) < 0)
return -1;
- else if (r > 0)
- return 1;
buf_pull(buf, n);
conn->sstp_state = STATE_SERVER_CONNECT_REQUEST_PENDING;
@@ -1979,8 +1975,6 @@ static int sstp_read(struct triton_md_handler_t *h)
n = conn->handler(conn, buf);
if (n < 0)
goto drop;
- else if (n > 0)
- return 1;
buf_expand_tail(buf, SSTP_MAX_PACKET_SIZE);
}