comparison freeDiameter/cnxctx.h @ 209:b9f48f2f2a22

Some cleanups in the code
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 16 Feb 2010 15:29:55 +0900
parents 536b1dde8761
children 5f2ce627db3c
comparison
equal deleted inserted replaced
208:e1da03ba112f 209:b9f48f2f2a22
44 char cc_remid[60]; /* Id of remote peer */ 44 char cc_remid[60]; /* Id of remote peer */
45 45
46 int cc_socket; /* The socket object of the connection -- <=0 if no socket is created */ 46 int cc_socket; /* The socket object of the connection -- <=0 if no socket is created */
47 47
48 int cc_proto; /* IPPROTO_TCP or IPPROTO_SCTP */ 48 int cc_proto; /* IPPROTO_TCP or IPPROTO_SCTP */
49 int cc_tls; /* Is TLS already started ? */ 49 uint32_t cc_status; /* True if the object is being destroyed: we don't send events anymore */
50 int cc_goterror; /* True when an error occurred on the socket */ 50 #define CC_STATUS_CLOSING 1
51 int cc_closing; /* True if the object is being destroyed: we don't send events anymore */ 51 #define CC_STATUS_ERROR 2
52 #define CC_STATUS_SIGNALED 4
53 #define CC_STATUS_TLS 8
52 54
53 pthread_t cc_rcvthr; /* thread for receiving messages on the connection */ 55 pthread_t cc_rcvthr; /* thread for receiving messages on the connection */
54 int cc_loop; /* tell the thread if it loops or stops after the first message is received */ 56 int cc_loop; /* tell the thread if it loops or stops after the first message is received */
55 57
56 struct fifo * cc_incoming; /* FIFO queue of events received on the connection, FDEVP_CNX_* */ 58 struct fifo * cc_incoming; /* FIFO queue of events received on the connection, FDEVP_CNX_* */
76 struct { 78 struct {
77 struct sctps_ctx *array; /* an array of cc_sctp_para.pairs elements -- the #0 is special (session is outside)*/ 79 struct sctps_ctx *array; /* an array of cc_sctp_para.pairs elements -- the #0 is special (session is outside)*/
78 struct sr_store *sess_store; /* Session data of the master session, to resume the children sessions */ 80 struct sr_store *sess_store; /* Session data of the master session, to resume the children sessions */
79 } cc_sctps_data; 81 } cc_sctps_data;
80 }; 82 };
83
84 void fd_cnx_markerror(struct cnxctx * conn);
81 85
82 /* Socket */ 86 /* Socket */
83 ssize_t fd_cnx_s_recv(struct cnxctx * conn, void *buffer, size_t length); 87 ssize_t fd_cnx_s_recv(struct cnxctx * conn, void *buffer, size_t length);
84 void fd_cnx_s_setto(int sock); 88 void fd_cnx_s_setto(int sock);
85 89
"Welcome to our mercurial repository"