--- chan_iax2.c.orig 2005-03-16 13:34:45.000000000 +0100 +++ chan_iax2.c 2005-03-30 15:43:35.000000000 +0200 @@ -864,7 +864,7 @@ /* We've still got lock held if we found a spot */ if (x >= TRUNK_CALL_START) { ast_log(LOG_WARNING, "No more space\n"); - return -1; + return 0; } iaxs[x] = new_iax(sin, lockpeer, host); update_max_nontrunk(); @@ -5058,6 +5058,8 @@ if ((vh->zeros == 0) && (ntohs(vh->callno) & 0x8000)) { /* This is a video frame, get call number */ fr.callno = find_callno(ntohs(vh->callno) & ~0x8000, dcallno, &sin, new, 1); + if (!fr.callno) + return 1; minivid = 1; } else if (meta->zeros == 0) { /* This is a meta header */