Ignore:
Timestamp:
Nov 5, 2014, 4:58:11 PM (9 years ago)
Author:
david
Message:
  • remove metapath parameter for python and js support
  • use conf in memory for C,python and js services
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PublicaMundi_David-devel/zoo-project/zoo-kernel/zoo_service_loader.c

    r524 r531  
    3838#include <libxml/xpathInternals.h>
    3939#include "service_zcfg.h"
     40#include <libgen.h>
    4041}
    4142#include "ulinet.h"
     
    211212}
    212213
     214/**
    213215int
    214216recursReaddirF (maps * m, xmlNodePtr n, char *conf_dir, char *prefix,
     
    334336  return 1;
    335337}
    336 
     338**/
    337339xmlXPathObjectPtr
    338340extractFromDoc (xmlDocPtr doc, const char *search)
     
    408410   */
    409411  map *r_inputs = NULL;
    410 #ifndef WIN32
    411   getcwd (ntmp, 1024);
    412 #else
    413   _getcwd (ntmp, 1024);
    414 #endif
    415412  r_inputs = getMap (s1->content, "serviceType");
    416413#ifdef DEBUG
     
    421418      && strncasecmp (r_inputs->value, "C", 1) == 0)
    422419    {
    423       r_inputs = getMap (request_inputs, "metapath");
    424       if (r_inputs != NULL)
    425         sprintf (tmps1, "%s/%s", ntmp, r_inputs->value);
    426       else
    427         sprintf (tmps1, "%s/", ntmp);
    428       char *altPath = zStrdup (tmps1);
     420      char *tmp_path =
     421        (char *) malloc ((strlen (s1->zcfg) + 1) * sizeof (char *));
     422      sprintf (tmp_path, "%s", s1->zcfg);
     423      char *dir = dirname (tmp_path);
    429424      r_inputs = getMap (s1->content, "ServiceProvider");
    430       sprintf (tmps1, "%s/%s", altPath, r_inputs->value);
    431       free (altPath);
     425      sprintf (tmps1, "%s/%s", dir, r_inputs->value);
     426      free (tmp_path);
    432427#ifdef DEBUG
    433428      fprintf (stderr, "Trying to load %s\n", tmps1);
     
    12641259      sprintf (tmpMsg,
    12651260               _
    1266                ("The value for <indetifier> seems to be wrong (%s). Please, ensure that the process exist using the GetCapabilities request."),
     1261               ("The value for <identifier> seems to be wrong (%s). Please, ensure that the process exist using the GetCapabilities request."),
    12671262               r_inputs->value);
    12681263      errorException (m, tmpMsg, "InvalidParameterValue", "identifier");
    12691264      free (tmpMsg);
    1270       free (s1);
     1265      //free (s1);
    12711266      freeMaps (&m);
    12721267      free (m);
     
    14601455          InternetCloseHandle (&hInternet);
    14611456          //freeService (&s1);
    1462           free (s1);
     1457          //free (s1);
    14631458          return 0;
    14641459        }
     
    16241619                          InternetCloseHandle (&hInternet);
    16251620                          //freeService (&s1);
    1626                           free (s1);
     1621                          //free (s1);
    16271622                          return 0;
    16281623                        }
     
    16461641                              InternetCloseHandle (&hInternet);
    16471642                              //freeService (&s1);
    1648                               free (s1);
     1643                              //free (s1);
    16491644                              return 0;
    16501645                            }
     
    16811676                              InternetCloseHandle (&hInternet);
    16821677                              //freeService (&s1);
    1683                               free (s1);
     1678                              //free (s1);
    16841679                              return 0;
    16851680                            }
     
    17491744                    {
    17501745                      xmlChar *val = xmlNodeListGetString (doc,
    1751                                                            cur2->
    1752                                                            xmlChildrenNode,
     1746                                                           cur2->xmlChildrenNode,
    17531747                                                           1);
    17541748                      if (tmpmaps == NULL)
     
    17791773                    {
    17801774                      xmlChar *val = xmlNodeListGetString (doc,
    1781                                                            cur2->
    1782                                                            xmlChildrenNode,
     1775                                                           cur2->xmlChildrenNode,
    17831776                                                           1);
    17841777                      if (tmpmaps == NULL)
     
    18661859                                          InternetCloseHandle (&hInternet);
    18671860                                          //freeService (&s1);
    1868                                           free (s1);
     1861                                          //free (s1);
    18691862                                          return 0;
    18701863                                        }
     
    22162209                            {
    22172210                              xmlChar *mv = xmlNodeListGetString (doc,
    2218                                                                   cur4->xmlChildrenNode,
     2211                                                                  cur4->
     2212                                                                  xmlChildrenNode,
    22192213                                                                  1);
    22202214                              map *ltmp = getMap (tmpmaps->content,
     
    22622256                            {
    22632257                              xmlChar *tmp = xmlNodeListGetRawString (doc,
    2264                                                                       cur4->xmlChildrenNode,
     2258                                                                      cur4->
     2259                                                                      xmlChildrenNode,
    22652260                                                                      0);
    22662261                              addToMap (tmpmaps->content,
     
    23312326                            InternetCloseHandle (&hInternet);
    23322327                            //freeService (&s1);
    2333                             free (s1);
     2328                            //free (s1);
    23342329                            return 0;
    23352330                          }
     
    24292424                    {
    24302425                      xmlChar *val = xmlNodeListGetString (NULL,
    2431                                                            cur2->
    2432                                                            xmlChildrenNode,
     2426                                                           cur2->xmlChildrenNode,
    24332427                                                           1);
    24342428                      free (tmpmaps->name);
     
    25172511                      {
    25182512                        xmlChar *val = xmlNodeListGetString (doc,
    2519                                                              cur1->
    2520                                                              xmlChildrenNode,
     2513                                                             cur1->xmlChildrenNode,
    25212514                                                             1);
    25222515                        if (tmpmaps == NULL)
     
    25782571                      {
    25792572                        xmlChar *val = xmlNodeListGetString (doc,
    2580                                                              cur1->
    2581                                                              xmlChildrenNode,
     2573                                                             cur1->xmlChildrenNode,
    25822574                                                             1);
    25832575                        if (tmpmaps == NULL)
     
    26552647                              {
    26562648                                xmlChar *val = xmlNodeListGetString (doc,
    2657                                                                      cur2->xmlChildrenNode,
     2649                                                                     cur2->
     2650                                                                     xmlChildrenNode,
    26582651                                                                     1);
    26592652                                if (tmpmaps == NULL)
     
    26952688                              {
    26962689                                xmlChar *val = xmlNodeListGetString (doc,
    2697                                                                      cur2->xmlChildrenNode,
     2690                                                                     cur2->
     2691                                                                     xmlChildrenNode,
    26982692                                                                     1);
    26992693                                if (tmpmaps == NULL)
     
    27972791              printExceptionReportResponse (m, tmpe);
    27982792              //freeService (&s1);
    2799               free (s1);
     2793              //free (s1);
    28002794              freeMap (&tmpe);
    28012795              free (tmpe);
     
    30273021                      "InvalidParameterValue", "storeExecuteResponse");
    30283022      //freeService (&s1);
    3029       free (s1);
     3023      //free (s1);
    30303024      freeMaps (&m);
    30313025      free (m);
     
    33493343
    33503344  //freeService (&s1);
    3351   free (s1);
     3345  //free (s1);
    33523346  freeMaps (&m);
    33533347  free (m);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png