Changeset 749:2557127f3c8b in freeDiameter for libfdcore
- Timestamp:
- Aug 8, 2011, 4:03:49 AM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/peers.c
r743 r749 456 456 msg = *cer; 457 457 458 /* If needed, resolve the dictio anry model for Origin-Host */458 /* If needed, resolve the dictionary model for Origin-Host */ 459 459 CHECK_POSIX( pthread_mutex_lock(&cache_avp_lock) ); 460 460 if (!avp_oh_model) { … … 471 471 CHECK_FCT( fd_msg_avp_hdr ( avp_oh, &avp_hdr ) ); 472 472 473 /* First, check if the Origin-Host value */473 /* First, check if the Origin-Host value is valid */ 474 474 if (!fd_os_is_valid_DiameterIdentity(avp_hdr->avp_value->os.data, avp_hdr->avp_value->os.len)) { 475 475 TRACE_DEBUG(INFO, "Received new CER with invalid Origin-Host"); … … 489 489 for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { 490 490 int cmp, cont; 491 peer = (struct fd_peer *)li ->o;491 peer = (struct fd_peer *)li; 492 492 cmp = fd_os_almostcasesrch( avp_hdr->avp_value->os.data, avp_hdr->avp_value->os.len, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, &cont ); 493 if (cmp <0) {493 if (cmp > 0) { 494 494 li_inf = li; 495 continue;496 495 } 497 496 if (cmp == 0) { … … 520 519 peer->p_hdr.info.config.pic_lft = 3600; /* 1 hour without any message 521 520 -- RFC3539 states that this must not be inferior to BRINGDOWN_INTERVAL = 5 minutes */ 521 CHECK_FCT_DO( ret = fd_p_expi_update( peer ), goto out ); 522 522 523 523 524 /* Insert the new peer in the list (the PSM will take care of setting the expiry after validation) */
Note: See TracChangeset
for help on using the changeset viewer.