X-Git-Url: http://sjero.net/git/?p=dccp2tcp;a=blobdiff_plain;f=dccp2tcp.c;h=a1a036ac76a20e94ee2fab17e416fe44d0e1670c;hp=c8cc769d1068397c0810ee30f2688785adf7f9f6;hb=d4fcf97617a831d17c5250be16cb6f83bec7b1d3;hpb=1bbfe6080ec64a1d292d863935dc18fec3c6373f diff --git a/dccp2tcp.c b/dccp2tcp.c index c8cc769..a1a036a 100644 --- a/dccp2tcp.c +++ b/dccp2tcp.c @@ -585,8 +585,8 @@ u_int32_t add_new_seq(struct host *seq, __be32 num, int size, enum dccp_pkt_type } if(seq->table==NULL){ - dbgprintf(1, "Warning: Connection initialization incorrect\n"); - return 0; + dbgprintf(1, "Warning: Connection uninitialized\n"); + return initialize_seq(seq, 0, num); } /*account for missing packets*/ @@ -631,6 +631,11 @@ u_int32_t convert_ack(struct host *seq, __be32 num) exit(1); } + if(seq->table==NULL){ + dbgprintf(1, "Warning: Connection uninitialized\n"); + initialize_seq(seq, 0, num); + } + /*loop through table looking for the DCCP ack number*/ for(int i=0; i < seq->size; i++){ if(seq->table[i].old==num){ @@ -651,6 +656,11 @@ int acked_packet_size(struct host *seq, __be32 num) exit(1); } + if(seq->table==NULL){ + dbgprintf(1, "Warning: Connection uninitialized\n"); + initialize_seq(seq, 0, num); + } + /*loop through table looking for the DCCP ack number*/ for(int i=0; i < seq->size; i++){ if(seq->table[i].old==num){