Prechádzať zdrojové kódy

Enrich DeviceList tables bug fix

Sasan Torabkheslat 5 rokov pred
rodič
commit
9837e32bf7
2 zmenil súbory, kde vykonal 37 pridanie a 13 odobranie
  1. 30 10
      .idea/workspace.xml
  2. 7 3
      main.cpp

+ 30 - 10
.idea/workspace.xml

@@ -29,12 +29,8 @@
     </configurations>
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="6938f4e3-b9b8-4c34-bea6-8fc5ace411e6" name="Default Changelist" comment="Add LAN IP address to Keys">
-      <change beforePath="$PROJECT_DIR$/.idea/sshConfigs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sshConfigs.xml" afterDir="false" />
+    <list default="true" id="6938f4e3-b9b8-4c34-bea6-8fc5ace411e6" name="Default Changelist" comment="Enrich DeviceList tables">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/FDIACS.dir/depend.make" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/FDIACS.dir/depend.make" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Makefile.cmake" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Makefile.cmake" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-log.txt" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-log.txt" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/main.cpp" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -134,7 +130,7 @@
       <workItem from="1588627256885" duration="1334000" />
       <workItem from="1591775026411" duration="2463000" />
       <workItem from="1591957319679" duration="3742000" />
-      <workItem from="1593105843144" duration="2976000" />
+      <workItem from="1593105843144" duration="6533000" />
     </task>
     <task id="LOCAL-00001" summary="Disable InfluxDB">
       <created>1572183659791</created>
@@ -213,7 +209,21 @@
       <option name="project" value="LOCAL" />
       <updated>1592025942513</updated>
     </task>
-    <option name="localTasksCounter" value="12" />
+    <task id="LOCAL-00012" summary="Enrich DeviceList tables">
+      <created>1593124332733</created>
+      <option name="number" value="00012" />
+      <option name="presentableId" value="LOCAL-00012" />
+      <option name="project" value="LOCAL" />
+      <updated>1593124332733</updated>
+    </task>
+    <task id="LOCAL-00013" summary="Enrich DeviceList tables">
+      <created>1593124450852</created>
+      <option name="number" value="00013" />
+      <option name="presentableId" value="LOCAL-00013" />
+      <option name="project" value="LOCAL" />
+      <updated>1593124450852</updated>
+    </task>
+    <option name="localTasksCounter" value="14" />
     <servers />
   </component>
   <component name="TodoView" selected-index="3">
@@ -255,7 +265,8 @@
     <MESSAGE value="Add datetime to Upgrade/Provision Procedures" />
     <MESSAGE value="1: fixing orphaned data in zabbix sender&#10;2: merge json files per second to send to GenieACS&#10;3: add upload/download volume to calculate used valume in zabbix" />
     <MESSAGE value="Add LAN IP address to Keys" />
-    <option name="LAST_COMMIT_MESSAGE" value="Add LAN IP address to Keys" />
+    <MESSAGE value="Enrich DeviceList tables" />
+    <option name="LAST_COMMIT_MESSAGE" value="Enrich DeviceList tables" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
@@ -274,14 +285,23 @@
     </state>
     <state x="221" y="87" key="SettingsEditor/0.0.1440.875@0.0.1440.875" timestamp="1593115913111" />
     <state x="221" y="89" key="SettingsEditor/0.0.1440.900/1440.0.1920.1080@0.0.1440.900" timestamp="1592046604694" />
-    <state x="320" y="190" key="Vcs.Push.Dialog.v2" timestamp="1592025947173">
-      <screen x="0" y="0" width="1440" height="900" />
+    <state x="320" y="185" key="Vcs.Push.Dialog.v2" timestamp="1593124458538">
+      <screen x="0" y="0" width="1440" height="875" />
     </state>
+    <state x="320" y="185" key="Vcs.Push.Dialog.v2/0.0.1440.875@0.0.1440.875" timestamp="1593124458538" />
     <state x="320" y="190" key="Vcs.Push.Dialog.v2/0.0.1440.900/1440.0.1920.1080@0.0.1440.900" timestamp="1592025947173" />
+    <state x="100" y="100" width="1240" height="675" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1593125758067">
+      <screen x="0" y="0" width="1440" height="875" />
+    </state>
+    <state x="100" y="100" width="1240" height="675" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.0.1440.875@0.0.1440.875" timestamp="1593125758067" />
     <state x="607" y="397" key="com.intellij.ide.ui.customization.CustomizableActionsPanel$EditIconDialog" timestamp="1592025646597">
       <screen x="0" y="0" width="1440" height="900" />
     </state>
     <state x="607" y="397" key="com.intellij.ide.ui.customization.CustomizableActionsPanel$EditIconDialog/0.0.1440.900/1440.0.1920.1080@0.0.1440.900" timestamp="1592025646597" />
+    <state x="508" y="358" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1593124392180">
+      <screen x="0" y="0" width="1440" height="875" />
+    </state>
+    <state x="508" y="358" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1440.875@0.0.1440.875" timestamp="1593124392180" />
   </component>
   <component name="XDebuggerManager">
     <watches-manager>

+ 7 - 3
main.cpp

@@ -586,11 +586,15 @@ int cwmpService::Inform(struct _cwmp__Inform *cwmp__Inform, struct _cwmp__Inform
          * tr069["PeriodicInformInterval"]
          */
         query <<
-              "replace into Device_List (IP,IMSI,`datetime`,update_interval,enodeb_id,cell_id,softwareversion,pcilock) values ('" +
-              std::string(ip) + "','" + imsi + "',NOW()" + "," + tr069["PeriodicInformInterval"] + "," +
+              "replace into Device_List (IP,IMSI,`datetime`,update_interval,enodeb_id,cell_id,softwareversion,pcilock,description) values ('" +
+              std::string(ip) + "','" + imsi + "',NOW()" + "," +
+              tr069_json["InternetGatewayDevice"]["ManagementServer"]["PeriodicInformInterval"]["_value"].dump() + "," +
               tr069["EnodeBId"] + "," + tr069["CellId"] +
-              "," + tr069["SoftwareVersion"] + "," + tr069["PCILock"] + ")";
+              ",'" + tr069["SoftwareVersion"] + "','" + tr069["PCILock"] + "'," +
+              tr069_json["InternetGatewayDevice"]["DeviceInfo"]["Description"]["_value"].dump() + ")";
 
+
+//        std::cout << "Query: " << imsi << " :" << query << std::endl;
         query.execute();
     } catch (mysqlpp::BadQuery er) { // handle any connection or
         std::cerr << "Error on IMSI-" << imsi << " :" << er.what() << std::endl;