X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=gnokii%2Fgnokii.c;h=4da6169f2011cac0d8b4357eeb20337955e53fd6;hp=c8db70051378bef65f3518834fa7304696c770a7;hb=a51604573a1dfaaad4304ffbf918e91617acf468;hpb=ab382e3c5d243a7b1b800fbfcb3a96b6566f6360 diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c index c8db700..4da6169 100644 --- a/gnokii/gnokii.c +++ b/gnokii/gnokii.c @@ -66,6 +66,8 @@ #include "files/gsm-filetypes.h" #include "gnokii.h" +#include "protocol/fbus.h" + #ifdef USE_NLS #include #endif @@ -7513,20 +7515,31 @@ int decodefile(int argc, char *argv[]) int i = 0; /* base model comes from gnokiirc */ +#if 0 strcat(model,"decode"); +#else + strcpy(model,"5190sniff"); + fbus_decoding=1; +#endif /* Initialise the GSM interface. */ fbusinit(NULL); - printf ("open InPutFile: %s\n", argv[0]); + printf ("open InPutFile: %s\n\n\n", argv[0]); if ( (infile = fopen( argv[0], "rb")) == NULL ) { printf ("Failed to open InPutFile: %s\n", argv[0]); exit (1); } while ( (nr_read = fread(in_buffer, 1, 16, infile)) > 0 ) { +static int last=0; + if (ftell(infile)>last+1000) { + last=ftell(infile); + printf("ftell=%d\n",last); + } for (i=0; i < nr_read; i++) Protocol->StateMachine(in_buffer[i]); } + puts("gnokii/decodefile() done"); return 0; }