Mercurial > hg > freeDiameter
diff freeDiameter/peers.c @ 22:0b3b46da2c12
Progress on server code
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 19 Oct 2009 18:43:09 +0900 |
parents | 277ec00d793e |
children | 3628f7d2ba88 |
line wrap: on
line diff
--- a/freeDiameter/peers.c Thu Oct 08 20:05:16 2009 +0900 +++ b/freeDiameter/peers.c Mon Oct 19 18:43:09 2009 +0900 @@ -100,11 +100,14 @@ p->p_hdr.info.pi_flags.exp = info->pi_flags.exp; p->p_hdr.info.pi_lft = info->pi_lft; - p->p_hdr.info.pi_streams = info->pi_streams; p->p_hdr.info.pi_port = info->pi_port; p->p_hdr.info.pi_tctimer = info->pi_tctimer; p->p_hdr.info.pi_twtimer = info->pi_twtimer; + if (info->pi_sec_data.priority) { + CHECK_MALLOC( p->p_hdr.info.pi_sec_data.priority = strdup(info->pi_sec_data.priority) ); + } + /* Move the items from one list to the other */ if (info->pi_endpoints.next) while (!FD_IS_LIST_EMPTY( &info->pi_endpoints ) ) { @@ -113,6 +116,7 @@ fd_list_insert_before(&p->p_hdr.info.pi_endpoints, li); } + /* The internal data */ if (orig_dbg) { CHECK_MALLOC( p->p_dbgorig = strdup(orig_dbg) ); @@ -228,7 +232,7 @@ } if (p->p_cnxctx) { - TODO("destroy p->p_cnxctx"); + fd_cnx_destroy(p->p_cnxctx); } if (p->p_cb) @@ -292,6 +296,7 @@ } list_empty = FD_IS_LIST_EMPTY(&fd_g_peers); CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); + CHECK_SYS( clock_gettime(CLOCK_REALTIME, &now) ); } if (!list_empty) {