aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs
index f6b17e5..eb287a4 100644
--- a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs
+++ b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRemoteConnector.cs
@@ -82,8 +82,13 @@ namespace OpenSim.OfflineIM
82 if (!ret.ContainsKey("RESULT")) 82 if (!ret.ContainsKey("RESULT"))
83 return ims; 83 return ims;
84 84
85 if (ret["RESULT"].ToString() == "NULL") 85 string result = ret["RESULT"].ToString();
86 if (result == "NULL" || result.ToLower() == "false")
87 {
88 string reason = ret.ContainsKey("REASON") ? ret["REASON"].ToString() : "Unknown error";
89 m_log.DebugFormat("[OfflineIM.V2.RemoteConnector]: GetMessages for {0} failed: {1}", principalID, reason);
86 return ims; 90 return ims;
91 }
87 92
88 foreach (object v in ((Dictionary<string, object>)ret["RESULT"]).Values) 93 foreach (object v in ((Dictionary<string, object>)ret["RESULT"]).Values)
89 { 94 {
@@ -110,7 +115,7 @@ namespace OpenSim.OfflineIM
110 string result = ret["RESULT"].ToString(); 115 string result = ret["RESULT"].ToString();
111 if (result == "NULL" || result.ToLower() == "false") 116 if (result == "NULL" || result.ToLower() == "false")
112 { 117 {
113 reason = ret["REASON"].ToString(); 118 reason = ret.ContainsKey("REASON") ? ret["REASON"].ToString() : "Unknown error";
114 return false; 119 return false;
115 } 120 }
116 121