comparison freeDiameter/cnxctx.c @ 407:7029e6b587ac

Fix warning
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 08 Jul 2010 15:15:59 +0900
parents 26aafbbc1640
children 4cb54e85fc71
comparison
equal deleted inserted replaced
406:345f3541df81 407:7029e6b587ac
267 267
268 #ifndef DISABLE_SCTP 268 #ifndef DISABLE_SCTP
269 /* SCTP-specific handlings */ 269 /* SCTP-specific handlings */
270 if (cli->cc_proto == IPPROTO_SCTP) { 270 if (cli->cc_proto == IPPROTO_SCTP) {
271 /* Retrieve the number of streams */ 271 /* Retrieve the number of streams */
272 CHECK_FCT_DO( fd_sctp_get_str_info( cli->cc_socket, &cli->cc_sctp_para.str_in, &cli->cc_sctp_para.str_out, NULL ), goto error ); 272 CHECK_FCT_DO( fd_sctp_get_str_info( cli->cc_socket, &cli->cc_sctp_para.str_in, &cli->cc_sctp_para.str_out, NULL ), {fd_cnx_destroy(cli); return NULL;} );
273 if (cli->cc_sctp_para.str_out < cli->cc_sctp_para.str_in) 273 if (cli->cc_sctp_para.str_out < cli->cc_sctp_para.str_in)
274 cli->cc_sctp_para.pairs = cli->cc_sctp_para.str_out; 274 cli->cc_sctp_para.pairs = cli->cc_sctp_para.str_out;
275 else 275 else
276 cli->cc_sctp_para.pairs = cli->cc_sctp_para.str_in; 276 cli->cc_sctp_para.pairs = cli->cc_sctp_para.str_in;
277 277
278 TRACE_DEBUG(FULL,"%s : client '%s' (SCTP:%d, %d/%d streams)", fd_cnx_getid(serv), fd_cnx_getid(cli), cli->cc_socket, cli->cc_sctp_para.str_in, cli->cc_sctp_para.str_out); 278 TRACE_DEBUG(FULL,"%s : client '%s' (SCTP:%d, %d/%d streams)", fd_cnx_getid(serv), fd_cnx_getid(cli), cli->cc_socket, cli->cc_sctp_para.str_in, cli->cc_sctp_para.str_out);
279 } 279 }
280 #endif /* DISABLE_SCTP */ 280 #endif /* DISABLE_SCTP */
281 281
282 return cli; 282 return cli;
283 error:
284 fd_cnx_destroy(cli);
285 return NULL;
286 } 283 }
287 284
288 /* Client side: connect to a remote server -- cancelable */ 285 /* Client side: connect to a remote server -- cancelable */
289 struct cnxctx * fd_cnx_cli_connect_tcp(sSA * sa /* contains the port already */, socklen_t addrlen) 286 struct cnxctx * fd_cnx_cli_connect_tcp(sSA * sa /* contains the port already */, socklen_t addrlen)
290 { 287 {
"Welcome to our mercurial repository"