First step is post something which is half-way decently indented if you want people to look at it.
Next tell us EXACTLY what you see on screen. A terminal log would be ideal.
ret=open_sqlite("/mnt/jffs2/atm.db");// the name of the database
ppp_open();//function to open ppp port to send the data.
//the defination of these two functions
int open_sqlite(char *db_name)
if(sqlite3_open(db_name, &db_conn) == SQLITE_OK)
printf("database opened \n");
ret=system("rm -f /var/run/ppp.link");
printf("\nreturn of system ppp.link::: %d",ret);
ret=system("/etc/ppp/dialout&");// the command to run the dailup function from the device.
printf("\nreturn of system dialout::: %d",ret);
printf("inside ppp_open :::::fd9 = %d\n",fd9);
if (fd9 > 0)
printf("\nNext to close\n");
printf("i = %d\n",i);
printf("\nPPP Connected \n");
Consider using the script utility to make a log.
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
script - make typescript of terminal session
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]
Script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as
proof of an assignment, as the typescript file can be printed out later with lpr(1).