/[H9]/trunk/FlisServer/FlisServerDlg.cpp
ViewVC logotype

Diff of /trunk/FlisServer/FlisServerDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 165 by kevin, Wed Dec 5 11:54:09 2007 UTC revision 166 by kevin, Wed Dec 5 16:03:05 2007 UTC
# Line 6  Line 6 
6  #include "FlisServerDlg.h"  #include "FlisServerDlg.h"
7  #include <vector>  #include <vector>
8  #include ".\flisserverdlg.h"  #include ".\flisserverdlg.h"
9    #include <atlrx.h>
10    
11  #ifdef _DEBUG  #ifdef _DEBUG
12  #define new DEBUG_NEW  #define new DEBUG_NEW
# Line 373  void CFlisServerDlg::SmsSplit(CString da Line 374  void CFlisServerDlg::SmsSplit(CString da
374                  HandleAcknowledge(TlfNr);                  HandleAcknowledge(TlfNr);
375                  return;                  return;
376          }          }
377                    CAtlRegExp<> regex;
378            if (regex.Parse("^{[0-9]+}:{[0-9]+}:[0-1]:[0-1]:[0-1]:[0-1]:$") == REPARSE_ERROR_OK)
379            {
380    
381                    CAtlREMatchContext<> pContext;
382    
383                    if (!regex.Match(FyrData, &pContext))
384                    {
385                            AppendText("Invalid SMS recieved");
386                            return;
387                    }
388            }
389            else
390            {
391                    AppendText("Regex PARSE error!!!"); //Burde aldrig kunne ske !
392            }
393    
394          SmsCount = Splitter(FyrData);          SmsCount = Splitter(FyrData);
395          Temper = Splitter(FyrData);          Temper = Splitter(FyrData);
396          Flamme = Splitter(FyrData);          Flamme = Splitter(FyrData);
# Line 421  void CFlisServerDlg::OnBnClickedClose() Line 438  void CFlisServerDlg::OnBnClickedClose()
438  {  {
439          // TODO: Add your control notification handler code here          // TODO: Add your control notification handler code here
440          continueThread = 0;          continueThread = 0;
441            Sleep(250);
442          DeleteSms();          DeleteSms();
443    
444          Sleep(500);          Sleep(500);
# Line 741  void CFlisServerDlg::SendConfig(CString Line 759  void CFlisServerDlg::SendConfig(CString
759                  CString SQL, Textwindow;                  CString SQL, Textwindow;
760                  SQL.Format("update command set executed=now() where id=%s",IDnr);                  SQL.Format("update command set executed=now() where id=%s",IDnr);
761                  db.ExecuteSQL(SQL);                  db.ExecuteSQL(SQL);
762                  Sleep(10);                  Sleep(100);
763                  AppendText("Command executed");                  AppendText("Command executed");
764          }          }
765          Sleep(150);          Sleep(150);
# Line 966  vector<keepalive> CFlisServerDlg::keepal Line 984  vector<keepalive> CFlisServerDlg::keepal
984          }          }
985    
986                    
 }  
987    }

Legend:
Removed from v.165  
changed lines
  Added in v.166

  ViewVC Help
Powered by ViewVC 1.1.20