This commit was generated by cvs2svn to compensate for changes in r158,
[gnokii.git] / common / data / virtmodem.c
index 7c7f4e2..2c389f9 100644 (file)
@@ -5,6 +5,8 @@
 
   A Linux/Unix toolset and driver for Nokia mobile phones.
 
+  Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml.
+
   Released under the terms of the GNU GPL, see file COPYING for more details.
 
   This file provides a virtual modem interface to the GSM phone by calling
   (AT-emulator) and "online" mode where the data pump code translates data
   from/to the GSM handset and the modem data/fax stream.
 
+  $Log$
+  Revision 1.1.1.3  2002/04/03 00:08:06  short
+  Found in "gnokii-working" directory, some November-patches version
+
+  Revision 1.4  2001/04/14 23:23:43  pkot
+  Fixed problems with grantpt
+
+  Revision 1.3  2001/03/21 23:36:04  chris
+  Added the statemachine
+  This will break gnokii --identify and --monitor except for 6210/7110
+
+  Revision 1.2  2001/02/21 19:57:02  chris
+  More fiddling with the directory layout
+
+  Revision 1.1  2001/02/16 14:29:51  chris
+  Restructure of common/.  Fixed a problem in fbus-phonet.c
+  Lots of dprintfs for Marcin
+  Any size xpm can now be loaded (eg for 7110 startup logos)
+  nk7110 code detects 7110/6210 and alters startup logo size to suit
+  Moved Marcin's extended phonebook code into gnokii.c
+
+  Revision 1.5  2001/01/08 15:11:37  pkot
+  Documentation updates.
+  Fixed some bugs and removed FIXMEs.
+  We need to move some stuff from configure.in to aclocal.m4
+
+  Revision 1.4  2001/01/02 09:09:09  pkot
+  Misc fixes and updates.
+
+  Revision 1.3  2000/12/27 10:54:14  pkot
+  Added Unix98 PTYs support (Michael Mráka).
+
+  
 */
 
 #define                __virtmodem_c
@@ -49,7 +84,7 @@
 
        /* Global variables */
 
-//extern bool TerminateThread;
+extern bool TerminateThread;
 int ConnectCount;
 
        /* Local variables */
@@ -66,7 +101,7 @@ bool                 RequestTerminate;
 
        /* If initialised in debug mode, stdin/out is used instead
           of ptys for interface. */
-bool   VM_Initialise(char *model,char *port, char *initlength, GSM_ConnectionType connection, char *bindir, bool debug_mode, bool GSMInit,char *synchronizetime)
+bool   VM_Initialise(char *model,char *port, char *initlength, GSM_ConnectionType connection, char *bindir, bool debug_mode, bool GSMInit)
 {
        int             rtn;
 
@@ -85,10 +120,9 @@ bool        VM_Initialise(char *model,char *port, char *initlength, GSM_ConnectionType
 #ifdef DEBUG
          fprintf (stderr , "Initialising GSM\n");
 #endif /* DEBUG */
-         if ((VM_GSMInitialise(model, port, initlength, connection, synchronizetime) != GE_NONE)) {
+         if ((VM_GSMInitialise(model, port, initlength, connection) != GE_NONE)) {
                fprintf (stderr, _("VM_Initialise - VM_GSMInitialise failed!\n"));
                return (false);
-               
          }
        }
        GSMInit=false;
@@ -241,7 +275,7 @@ void    VM_CharHandler(void)
       /* Note that file closure etc. should have been dealt with in ThreadLoop */
       
       if (res < 0) {   
-//         TerminateThread=true;
+           TerminateThread=true;
            return;
       }
        
@@ -250,14 +284,15 @@ void    VM_CharHandler(void)
 }     
 
        /* Initialise GSM interface, returning GSM_Error as appropriate  */
-GSM_Error      VM_GSMInitialise(char *model, char *port, char *initlength, GSM_ConnectionType connection, char *synchronizetime)
+GSM_Error      VM_GSMInitialise(char *model, char *port, char *initlength, GSM_ConnectionType connection)
 {
        int             count=0;
        GSM_Error       error;
+       static GSM_Statemachine sm;
 
                /* Initialise the code for the GSM interface. */     
 
-       error = GSM_Initialise(model,port, initlength, connection, RLP_DisplayF96Frame, synchronizetime);
+       error = GSM_Initialise(model,port, initlength, connection, RLP_DisplayF96Frame, &sm);
 
        if (error != GE_NONE) {
                fprintf(stderr, _("GSM/FBUS init failed! (Unknown model ?). Quitting.\n"));