Ignore:
Timestamp:
Oct 21, 2020, 6:31:09 PM (19 months ago)
Author:
djay
Message:

Update OGC API - Processes documentation and implementation, providing a browsable User Interface to Processes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/sqlapi.c

    r955 r962  
    3333#include <fcgi_stdio.h>
    3434#include "sqlapi.h"
     35#include "service_callback.h"
    3536
    3637/**
     
    375376  map *msg=getMapFromMaps(conf,"lenv","message");
    376377  map *schema=getMapFromMaps(conf,"database","schema");
    377   char *sqlQuery=(char*)malloc((strlen(schema->value)+strlen(msg->value)+strlen(p->value)+strlen(sid->value)+64+1)*sizeof(char));
     378  char *sqlQuery=(char*)malloc((strlen(schema->value)+strlen(msg->value)+strlen(p->value)+strlen(sid->value)+62+1)*sizeof(char));
    378379  sprintf(sqlQuery,"UPDATE %s.services set status=$$%s$$,message=$$%s$$ where uuid=$$%s$$;",schema->value,p->value,msg->value,sid->value);
    379380  if( zoo_DS == NULL || zoo_DS[zoo_ds_nb-1]==NULL ){
     381    if(getMapFromMaps(conf,"lenv","file.log")==NULL){
     382      free(sqlQuery);
     383      return 1;
     384    }
    380385    init_sql(conf);
    381386    zoo_ds_nb++;
     
    384389  cleanUpResultSet(conf,zoo_ds_nb-1);
    385390  free(sqlQuery);
     391  invokeBasicCallback(conf,SERVICE_STARTED);
    386392  return 0;
    387393}
     
    398404  int created=-1;
    399405  map *schema=getMapFromMaps(conf,"database","schema");
    400   char *sqlQuery=(char*)malloc((strlen(schema->value)+strlen(pid)+58+1)*sizeof(char));
    401   sprintf(sqlQuery,"select status||'|'||message from %s.services where uuid=$$%s$$;",schema->value,pid);
     406  char *sqlQuery=(char*)malloc((strlen(schema->value)+strlen(pid)+104+1)*sizeof(char)); 
     407  sprintf(sqlQuery,"select CASE WHEN message is null THEN '-1' ELSE status||'|'||message END from %s.services where uuid=$$%s$$;",schema->value,pid);
    402408  if( zoo_ds_nb==
    403409#ifdef META_DB
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