]> sjero.net Git - dccp2tcp/blobdiff - dccp2tcp.c
Tag older versions in repository
[dccp2tcp] / dccp2tcp.c
index bbf729973186f8c7c08b80a79074936c73f08c13..672997e83fa1dbaf109124afac7a00b23b274c10 100644 (file)
@@ -56,8 +56,9 @@ int main(int argc, char *argv[])
 
        /*loop through commandline options*/
        for(int i=1; i < argc; i++){
-               if(argv[i][0]!='-'){
-                       if(dfile==NULL){ /*assign first non-dash argument to the dccp file*/
+               if(argv[i][0]!='-' || (argv[i][0]=='-' && strlen(argv[i])==1)){
+                       if(dfile==NULL  || argv[i][0]=='-'){
+                               /*assign first non-dash (or only dash) argument to the dccp file*/
                                dfile=argv[i];
                        }else{
                                if(tfile==NULL){
@@ -131,6 +132,9 @@ int main(int argc, char *argv[])
        /*close files*/
        pcap_close(in);
        pcap_dump_close(out);
+
+       /*Delete all connections*/
+       cleanup_connections();
 return 0;
 }