version 0.1.13
[fms.git] / src / freenet / trustlistrequester.cpp
index 3fd5d99..77b03b1 100644 (file)
@@ -96,8 +96,22 @@ const bool TrustListRequester::HandleAllData(FCPMessage &message)
                        //insert trust for this identity\r
                        trustst.Bind(0,identityid);\r
                        trustst.Bind(1,id);\r
-                       trustst.Bind(2,xml.GetMessageTrust(i));\r
-                       trustst.Bind(3,xml.GetTrustListTrust(i));\r
+                       if(xml.GetMessageTrust(i)==-1)\r
+                       {\r
+                               trustst.Bind(2);\r
+                       }\r
+                       else\r
+                       {\r
+                               trustst.Bind(2,xml.GetMessageTrust(i));\r
+                       }\r
+                       if(xml.GetTrustListTrust(i)==-1)\r
+                       {\r
+                               trustst.Bind(3);\r
+                       }\r
+                       else\r
+                       {\r
+                               trustst.Bind(3,xml.GetTrustListTrust(i));\r
+                       }\r
                        trustst.Step();\r
                        trustst.Reset();\r
 \r