修正http_session部分函数的定义
* 去掉http_session_passthough函数,该函数与detach意义重复,不再保留。 * detach不需要session的可写权限,故参数修正为const类型。
This commit is contained in:
@@ -150,9 +150,8 @@ struct tfe_http_half_ops
|
|||||||
struct tfe_http_session_ops
|
struct tfe_http_session_ops
|
||||||
{
|
{
|
||||||
struct tfe_http_session * (* ops_allow_write)(const struct tfe_http_session * session);
|
struct tfe_http_session * (* ops_allow_write)(const struct tfe_http_session * session);
|
||||||
void (* ops_detach)(struct tfe_http_session * session);
|
void (* ops_detach)(const struct tfe_http_session * session);
|
||||||
void (* ops_drop)(struct tfe_http_session * session);
|
void (* ops_drop)(struct tfe_http_session * session);
|
||||||
void (* ops_passthrough)(struct tfe_http_session * session);
|
|
||||||
|
|
||||||
void (* ops_request_set)(struct tfe_http_session * session, struct tfe_http_half * req);
|
void (* ops_request_set)(struct tfe_http_session * session, struct tfe_http_half * req);
|
||||||
void (* ops_response_set)(struct tfe_http_session * session, struct tfe_http_half * resp);
|
void (* ops_response_set)(struct tfe_http_session * session, struct tfe_http_half * resp);
|
||||||
@@ -277,7 +276,7 @@ static inline struct tfe_http_session * tfe_http_session_allow_write(const struc
|
|||||||
return session->ops->ops_allow_write(session);
|
return session->ops->ops_allow_write(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void tfe_http_session_detach(struct tfe_http_session * session)
|
static inline void tfe_http_session_detach(const struct tfe_http_session * session)
|
||||||
{
|
{
|
||||||
return session->ops->ops_detach(session);
|
return session->ops->ops_detach(session);
|
||||||
}
|
}
|
||||||
@@ -287,11 +286,6 @@ static inline void tfe_http_session_drop(struct tfe_http_session * session)
|
|||||||
return session->ops->ops_drop(session);
|
return session->ops->ops_drop(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void tfe_http_session_passthrough(struct tfe_http_session * session)
|
|
||||||
{
|
|
||||||
return session->ops->ops_passthrough(session);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void tfe_http_session_request_set(struct tfe_http_session * session, struct tfe_http_half * req)
|
static inline void tfe_http_session_request_set(struct tfe_http_session * session, struct tfe_http_half * req)
|
||||||
{
|
{
|
||||||
return session->ops->ops_request_set(session, req);
|
return session->ops->ops_request_set(session, req);
|
||||||
|
|||||||
Reference in New Issue
Block a user