supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp
branchRCL_3
changeset 4 42de37ce7ce4
parent 0 667063e416a2
child 22 4c4ed41530db
child 44 2b4ea9893b66
--- a/supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp	Tue Feb 02 10:12:24 2010 +0200
+++ b/supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp	Fri Feb 19 23:14:27 2010 +0200
@@ -516,9 +516,19 @@
         OtherProperties |= KEditable;
         }
     
-    TBuf<KGenericStringLen> tempBuf;
+    TBuf<KMaxHSLPAddrLen> tempBuf;
+    TBuf<KMaxIAPLen> tempIapBuf;
     tempBuf.Copy(*SLPAddress);
-    tempBuf.Trim();
+    tempIapBuf.Copy(*IAPName);
+    tempBuf.TrimAll();
+    tempIapBuf.TrimAll();
+    
+    if( tempBuf.Length() == 0 )
+	    {
+	    CleanupStack::PopAndDestroy(3); //SLPAddress,IAPName,manuName
+        User::Leave(KErrArgument);        
+	    }
+    
     
     iSQLString.Copy(KInsertIntoTable);
     iSQLString.Append(KCreateTableName);
@@ -594,7 +604,7 @@
     iSQLString.Append(KCommaSeparator);
 
     iSQLString.Append(KQuotes);
-    iSQLString.Append(*IAPName);
+    iSQLString.Append(tempIapBuf);
     iSQLString.Append(KQuotes);
     iSQLString.Append(KCommaSeparator);