Mercurial > hg > freeDiameter
diff 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 |
line wrap: on
line diff
--- a/freeDiameter/cnxctx.h Mon Feb 15 18:16:12 2010 +0900 +++ b/freeDiameter/cnxctx.h Tue Feb 16 15:29:55 2010 +0900 @@ -46,9 +46,11 @@ int cc_socket; /* The socket object of the connection -- <=0 if no socket is created */ int cc_proto; /* IPPROTO_TCP or IPPROTO_SCTP */ - int cc_tls; /* Is TLS already started ? */ - int cc_goterror; /* True when an error occurred on the socket */ - int cc_closing; /* True if the object is being destroyed: we don't send events anymore */ + uint32_t cc_status; /* True if the object is being destroyed: we don't send events anymore */ + #define CC_STATUS_CLOSING 1 + #define CC_STATUS_ERROR 2 + #define CC_STATUS_SIGNALED 4 + #define CC_STATUS_TLS 8 pthread_t cc_rcvthr; /* thread for receiving messages on the connection */ int cc_loop; /* tell the thread if it loops or stops after the first message is received */ @@ -79,6 +81,8 @@ } cc_sctps_data; }; +void fd_cnx_markerror(struct cnxctx * conn); + /* Socket */ ssize_t fd_cnx_s_recv(struct cnxctx * conn, void *buffer, size_t length); void fd_cnx_s_setto(int sock);