Changeset 1186:56c36d1007b4 in freeDiameter for libfdcore/p_out.c
- Timestamp:
- Jun 7, 2013, 7:48:34 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/p_out.c
r1119 r1186 37 37 38 38 /* Alloc a new hbh for requests, bufferize the message and send on the connection, save in sentreq if provided */ 39 static int do_send(struct msg ** msg, uint32_t flags,struct cnxctx * cnx, uint32_t * hbh, struct fd_peer * peer)39 static int do_send(struct msg ** msg, struct cnxctx * cnx, uint32_t * hbh, struct fd_peer * peer) 40 40 { 41 41 struct msg_hdr * hdr; … … 47 47 struct msg *cpy_for_logs_only; 48 48 49 TRACE_ENTRY("%p % x %p %p %p", msg, flags, cnx, hbh, peer);49 TRACE_ENTRY("%p %p %p %p", msg, cnx, hbh, peer); 50 50 51 51 /* Retrieve the message header */ … … 76 76 77 77 /* Send the message */ 78 CHECK_FCT_DO( ret = fd_cnx_send(cnx, buf, sz , flags), );78 CHECK_FCT_DO( ret = fd_cnx_send(cnx, buf, sz), ); 79 79 out: 80 80 ; … … 128 128 129 129 /* Send the message, log any error */ 130 CHECK_FCT_DO( ret = do_send(&msg, 0,peer->p_cnxctx, &peer->p_hbh, peer),130 CHECK_FCT_DO( ret = do_send(&msg, peer->p_cnxctx, &peer->p_hbh, peer), 131 131 { 132 132 if (msg) { … … 149 149 150 150 /* Wrapper to sending a message either by out thread (peer in OPEN state) or directly; cnx or peer must be provided. Flags are valid only for direct sending, not through thread (unused) */ 151 int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer , uint32_t flags)151 int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer) 152 152 { 153 153 struct msg_hdr * hdr; 154 154 155 TRACE_ENTRY("%p %p %p %x", msg, cnx, peer, flags);155 TRACE_ENTRY("%p %p %p", msg, cnx, peer); 156 156 CHECK_PARAMS( msg && *msg && (cnx || (peer && peer->p_cnxctx))); 157 157 … … 182 182 183 183 /* Do send the message */ 184 CHECK_FCT_DO( ret = do_send(msg, flags,cnx, hbh, peer),184 CHECK_FCT_DO( ret = do_send(msg, cnx, hbh, peer), 185 185 { 186 186 if (msg) { … … 205 205 CHECK_POSIX( pthread_create(&peer->p_outthr, NULL, out_thr, peer) ); 206 206 207 CHECK_FCT( fd_cnx_unordered_delivery(peer->p_cnxctx, 1) ); 208 207 209 return 0; 208 210 } … … 214 216 CHECK_PARAMS( CHECK_PEER(peer) ); 215 217 218 CHECK_FCT( fd_cnx_unordered_delivery(peer->p_cnxctx, 0) ); 219 216 220 CHECK_FCT( fd_thr_term(&peer->p_outthr) ); 217 221
Note: See TracChangeset
for help on using the changeset viewer.