#include "log.h"
#include "memory.h"
#include "if.h"
+#include "lib_errors.h"
#include "pimd.h"
#include "pim_iface.h"
}
src = XCALLOC(MTYPE_PIM_IGMP_GROUP_SOURCE, sizeof(*src));
- if (!src) {
- zlog_warn("%s %s: XCALLOC() failure", __FILE__,
- __PRETTY_FUNCTION__);
- return 0; /* error, not found, could not create */
- }
src->t_source_timer = NULL;
src->source_group = group; /* back pointer */
}
src = source_new(group, src_addr);
- if (!src) {
- return 0;
- }
return src;
}
/* E.4: if not found, create source with timer=GMI:
* (A-X-Y) */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
igmp_source_reset_gmi(group->group_igmp_sock, group,
source);
/* I.4: if not found, create source with timer=0 (B-A)
*/
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* (B-A) timer=0 */
}
} else {
/* If not found, create new source */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
}
/* (B)=GMI */
} else {
/* If not found, create new source */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
}
/* (A)=GMI */
/* If source not found, create source with timer=0:
* (B-A)=0 */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* (B-A) timer=0 */
}
* (A-X-Y)=Group Timer */
long group_timer_msec;
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
group_timer_msec = igmp_group_timer_remain_msec(group);
* (A-X-Y)=Group Timer */
long group_timer_msec;
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
group_timer_msec = igmp_group_timer_remain_msec(group);
msg_size = IGMP_V3_SOURCES_OFFSET + (num_sources << 2);
if (msg_size > query_buf_size) {
- zlog_err(
+ flog_err(
+ EC_LIB_DEVELOPMENT,
"%s %s: unable to send: msg_size=%zd larger than query_buf_size=%d",
__FILE__, __PRETTY_FUNCTION__, msg_size,
query_buf_size);