--- main/udptl.c 2012-04-02 11:34:23.000000000 +0200 +++ main/udptl.c 2012-04-02 11:33:44.000000000 +0200 @@ -670,6 +670,7 @@ struct ast_sockaddr addr; uint16_t seqno = 0; uint16_t *udptlheader; + struct ast_frame *current_frame, *next_frame; /* Cache where the header will go */ res = ast_recvfrom(udptl->fd, @@ -715,6 +716,14 @@ if (udptl_rx_packet(udptl, udptl->rawdata + AST_FRIENDLY_OFFSET, res) < 1) return &ast_null_frame; + current_frame = &udptl->f[0]; + for (next_frame = AST_LIST_NEXT(current_frame, frame_list); + current_frame; + current_frame = next_frame, next_frame = current_frame ? AST_LIST_NEXT(current_frame, frame_list) : NULL) { + if (current_frame->datalen != 0 && current_frame->data.ptr == NULL) + return &ast_null_frame; + } + return &udptl->f[0]; }