Add NULL check for AT Request 30/21330/2
authorSuresh Kumar N <suresh.n@samsung.com>
Mon, 12 May 2014 06:58:12 +0000 (12:28 +0530)
committerDongchul Lim <dc7.lim@samsung.com>
Mon, 19 May 2014 07:26:47 +0000 (16:26 +0900)
Change-Id: I4ead55dfc257fb98dc320607718865bfb734ff4b

src/at.c
tel-headers/introspection/sat.xml

index b3ba72a8a05c07d2f10cbc021aaf9e3aa85c392d..92216a322cf81e01a15f770cf565a07b13a8a56a 100644 (file)
--- a/src/at.c
+++ b/src/at.c
@@ -491,6 +491,11 @@ TelReturn tcore_at_set_request(TcoreAT *at, TcoreAtRequest *req)
                dbg("AT Request - Command: [%s] Pre-fix: [%s] Type: [%d])",
                        at->req->cmd, at->req->prefix, at->req->type);
        }
+       else {
+               err("AT request is NULL");
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
        return TEL_RETURN_SUCCESS;
 }
 
@@ -505,6 +510,11 @@ TelReturn tcore_at_send_data(TcoreAT *at, TcoreAtRequest *req, gboolean send)
                return TEL_RETURN_INVALID_PARAMETER;
        }
 
+       if (req == NULL) {
+               err("AT request is NULL");
+               return TEL_RETURN_INVALID_PARAMETER;
+       }
+
        if ((ret = tcore_at_set_request(at, req)) != TEL_RETURN_SUCCESS) {
                err("Failed to set AT request");
                return ret;
index 85b5cff94a1623e51014e6030fa2e34781e58d20..0515c1e8c4f7480f3393aed1dadb962274bfdf0c 100644 (file)
@@ -29,7 +29,7 @@
                        <arg direction="in" type="i" name="command_id"/>
                        <arg direction="in" type="i" name="command_type"/>
                        <arg direction="in" type="i" name="user_confirm_type"/>
-                       <arg direction="in" type="s" name="additional_data"/>
+                       <arg direction="in" type="v" name="additional_data"/>
                        <arg direction="out" type="i" name="result"/>
                </method>