Ignore:
Timestamp:
Mar 28, 2015, 12:58:00 AM (9 years ago)
Author:
djay
Message:

Fix for OTB support when input was passed by value rather than reference.

File:
1 edited

Legend:

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

    r607 r618  
    27882788            map *ext=getMap(tmpI->content,"extension");
    27892789            char *file_path;
    2790                 char file_ext[32];
     2790            char file_ext[32];
    27912791
    27922792            if( ext != NULL && ext->value != NULL) {
    2793                         strncpy(file_ext, ext->value, 32);
    2794                 }
    2795                 else {
     2793              strncpy(file_ext, ext->value, 32);
     2794            }
     2795            else {
    27962796              // Obtain default file extension (see mimetypes.h).             
    27972797              // If the MIME type is not recognized, txt is used as the default extension
    27982798              map* mtype=getMap(tmpI->content,"mimeType");
    2799                   getFileExtension(mtype != NULL ? mtype->value : NULL, file_ext, 32);
     2799              getFileExtension(mtype != NULL ? mtype->value : NULL, file_ext, 32);
    28002800            }
    28012801               
    2802                 file_name=(char*)malloc((strlen(s->name)+strlen(file_ext)+strlen(tmpI->name)+1024)*sizeof(char));
     2802            file_name=(char*)malloc((strlen(s->name)+strlen(file_ext)+strlen(tmpI->name)+1024)*sizeof(char));
    28032803            int cpid0=cpid+time(NULL);     
    2804                 sprintf(file_name,"%s_%s_%i.%s",s->name,tmpI->name,cpid0,file_ext);
     2804            sprintf(file_name,"%s_%s_%i.%s",s->name,tmpI->name,cpid0,file_ext);
    28052805            file_path=(char*)malloc((strlen(tmp1->value)+strlen(file_name)+2)*sizeof(char));
    28062806            sprintf(file_path,"%s/%s",tmp1->value,file_name);
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