Module: sip-router
Branch: oej/permissionsrpc
Commit: e447cf03ddfb790b21f89fb4c8ed476e904e6620
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e447cf03ddfb790b21f89fb4c8ed476e904e6620

Author: Olle E. Johansson <[email protected]>
Committer: Olle E. Johansson <[email protected]>
Date:   Sun Dec 23 20:01:00 2012 +0100

Strlen of str works but not str->s

---

 modules_k/permissions/mi.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules_k/permissions/mi.c b/modules_k/permissions/mi.c
index c86388e..ee17534 100644
--- a/modules_k/permissions/mi.c
+++ b/modules_k/permissions/mi.c
@@ -261,21 +261,21 @@ void rpc_test_uri(rpc_t* rpc, void* c)
        unsigned int allow_suffix_len;
        int i;
 
-       if (rpc->scan(c, ".S", &basenamep) != 1) {
+       if (rpc->scan(c, "S", &basenamep) != 1) {
                rpc->fault(c, 500, "Not enough parameters (basename, URI and 
contact)");
                return;
        }
-       //LM_DBG("Basename %s length %d \n", basenamep, basenamep->len);
-       if (rpc->scan(c, ".S", &urip) != 1) {
+       LM_DBG("Basename %s length %d strlen(%d)\n", basenamep, basenamep->len, 
strlen(basenamep));
+       if (rpc->scan(c, "S", &urip) != 1) {
                rpc->fault(c, 500, "Not enough parameters (basename, URI and 
contact)");
                return;
        }
-        //LM_DBG("URI %s length %d \n", urip, urip->len);
-       if (rpc->scan(c, ".S", &contactp) != 1) {
+       LM_DBG("URI %s length %d \n", urip, urip->len);
+       if (rpc->scan(c, "S", &contactp) != 1) {
                rpc->fault(c, 500, "Not enough parameters (basename, URI and 
contact)");
                return;
        }
-       //LM_DBG("Contact %s length %d size %d\n", contactp, contactp->len, 
sizeof(contactp->s) - 1);
+       LM_DBG("Contact %s length %d size %d\n", contactp, contactp->len, 
sizeof(contactp->s) - 1);
 
        /* For some reason, rtp->scan doesn't set the length properly */
        if (contactp->len > MAX_URI_SIZE) {


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to