int edg_wll_close_proxy(edg_wll_Context ctx)
{
- close(ctx->connPlain->sock);
- ctx->connPlain->sock = 0;
-
- return edg_wll_Error(ctx,NULL,NULL);
+ edg_wll_plain_close(&ctx->connProxy->conn);
+
+ return edg_wll_Error(ctx, NULL, NULL);
}
int flags;
- ctx->connPlain->sock = socket(PF_UNIX, SOCK_STREAM, 0);
- if (ctx->connPlain->sock < 0) {
+ ctx->connProxy->conn.sock = socket(PF_UNIX, SOCK_STREAM, 0);
+ if (ctx->connProxy->conn.sock < 0) {
edg_wll_SetError(ctx, errno, "socket() error");
goto err;
}
}
strcpy(saddr.sun_path, ctx->p_lbproxy_serve_sock);
- if ((flags = fcntl(ctx->connPlain->sock, F_GETFL, 0)) < 0 ||
- fcntl(ctx->connPlain->sock, F_SETFL, flags | O_NONBLOCK) < 0) {
+ if ((flags = fcntl(ctx->connProxy->conn.sock, F_GETFL, 0)) < 0 ||
+ fcntl(ctx->connProxy->conn.sock, F_SETFL, flags | O_NONBLOCK) < 0) {
edg_wll_SetError(ctx, errno, "fcntl()");
goto err;
}
- if (connect(ctx->connPlain->sock, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) {
+ if (connect(ctx->connProxy->conn.sock, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) {
edg_wll_SetError(ctx, errno, "connect()");
goto err;
}
*/
static
int
-get_reply(edg_wll_Context context, edg_wll_Connection *conn, char **buf, int *code_min)
+get_reply(edg_wll_Context context, edg_wll_PlainConnection *conn, char **buf, int *code_min)
{
char buffer[17];
char *msg, *p;
*
*----------------------------------------------------------------------
*/
-int edg_wll_log_proto_client_proxy(edg_wll_Context context, edg_wll_Connection *conn, edg_wll_LogLine logline)
+int edg_wll_log_proto_client_proxy(edg_wll_Context context, edg_wll_PlainConnection *conn, edg_wll_LogLine logline)
{
char *p; int len;
char *ucs = "honik6";
int edg_wll_log_proto_client(edg_wll_Context context, edg_wll_GssConnection *con, edg_wll_LogLine logline/*, int priority,*/);
int edg_wll_log_proto_client_failure(edg_wll_Context context, int code, edg_wll_GssStatus *gss_code, const char *text);
-int edg_wll_log_proto_client_proxy(edg_wll_Context context, edg_wll_Connection *conn, edg_wll_LogLine logline);
+int edg_wll_log_proto_client_proxy(edg_wll_Context context, edg_wll_PlainConnection *conn, edg_wll_LogLine logline);
#ifdef __cplusplus
}
int answer;
struct sockaddr_un saddr;
int flags;
- edg_wll_Connection conn;
+ edg_wll_PlainConnection conn;
edg_wll_ResetError(context);
answer = 0;
answer = edg_wll_log_proto_client_proxy(context,&conn,logline);
- close(conn.sock);
+ edg_wll_plain_close(&conn);
edg_wll_DoLogEventProxy_end: