Module: kamailio
Branch: master
Commit: c3c478874e39f8a7e64bffcd99d9b04a3c4bbd90
URL: 
https://github.com/kamailio/kamailio/commit/c3c478874e39f8a7e64bffcd99d9b04a3c4bbd90

Author: Olle E. Johansson <[email protected]>
Committer: Olle E. Johansson <[email protected]>
Date: 2016-03-30T22:00:29+02:00

http_client Add debug and some notes in TODO

---

Modified: modules/http_client/TODO.txt
Modified: modules/http_client/http_client.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c3c478874e39f8a7e64bffcd99d9b04a3c4bbd90.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c3c478874e39f8a7e64bffcd99d9b04a3c4bbd90.patch

---

diff --git a/modules/http_client/TODO.txt b/modules/http_client/TODO.txt
index 41b4cec..c80c4a3 100644
--- a/modules/http_client/TODO.txt
+++ b/modules/http_client/TODO.txt
@@ -13,6 +13,9 @@ The http_client module - todo
 - save fingerprint of cert for trust-on-first-use procedure
 
 - connection and last status for httpcon-object, needs to be object in process 
memory, so child_init
+       Note: Right now httpcon-objects are allocated in pkg memory. This is 
bad for a reload,
+       but good for what we need to do here. 
+       - test what happens if we allocate curlcon objects in shared memory and 
use locks
        - if 5xx response or timeout set flag
        - function in dialplan - httpcon_exists(object)
        - pv $curlstatus(object) ??
diff --git a/modules/http_client/http_client.c 
b/modules/http_client/http_client.c
index 86d6fad..1d1519c 100644
--- a/modules/http_client/http_client.c
+++ b/modules/http_client/http_client.c
@@ -1,6 +1,6 @@
 /*
  * http_client Module
- * Copyright (C) 2015 Edvina AB, Olle E. Johansson
+ * Copyright (C) 2015-2016 Edvina AB, Olle E. Johansson
  *
  * Based on part of the utils module and part
  * of the json-rpc-c module
@@ -60,6 +60,7 @@
 #include "../../rpc_lookup.h"
 #include "../../config.h"
 #include "../../lvalue.h"
+#include "../../pt.h"          /* Process table */
 
 #include "functions.h"
 #include "curlcon.h"
@@ -167,7 +168,7 @@ static pv_export_t mod_pvs[] = {
     {{"curlerror", (sizeof("curlerror")-1)}, /* Curl error codes */
      PVT_OTHER, pv_get_curlerror, 0,
        pv_parse_curlerror, 0, 0, 0},
-    {{"curlredirect", (sizeof("redirect")-1)}, /* Curl error codes */
+    {{"curlredirect", (sizeof("redirect")-1)}, /* Curl last redirect url - not 
implemented yet */
      PVT_OTHER, pv_get_curlredirect, 0,
        pv_parse_curlredirect, 0, 0, 0},
     {{0, 0}, 0, 0, 0, 0, 0, 0, 0}
@@ -299,9 +300,12 @@ int curl_support_ipv6()
 /* Child initialization function */
 static int child_init(int rank)
 {      
+       int i = my_pid();
+
        if (rank==PROC_INIT || rank==PROC_MAIN || rank==PROC_TCP_MAIN) {
                return 0; /* do nothing for the main process */
        }
+       LM_DBG("*** http_client module initializing process %d\n", i);
 
        return 0;
 }


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

Reply via email to