<br><div class="gmail_quote">In my case, i'm using the same mapfile to publish with Mapserver and to <span lang="en"><span>parameterize TinyOWS<br>So i got more than one type of connection.<br>
in Fact, it's two : WMS and POSTGIS <br> <br>so i did this in mapfile.c :<br> static void layer_properties(char * yytext, bool quotes)<br>{<br> char *p;<br> char WMS[] = "\"http:";<br> /* remove surrounding quotes */<br>
if (quotes) {<br> for (p = yytext; *p ; p++); *(--p) = 0; yytext++;<br> }<br><br> switch(map_layer_prop_state) {<br> case MAP_LAYER_NAME:<br> map_l->name = buffer_init();<br>
buffer_add_str(map_l->name, yytext);<br> return;<br> case MAP_LAYER_CONNECTION:<br> /* TODO: Having a Layer connection notion in TinyOWS*/<br> if(strncmp(WMS, yytext,6)==0)<br>
return;<br> else if (map_o->pg_dsn->use && strcmp(map_o->pg_dsn->buf, yytext))<br> ows_error(map_o, OWS_ERROR_CONFIG_FILE,<br> /*"MapFile have more than one single PostGIS db connection.",*/<br>
yytext,<br> "parse_config_file");<br> else if (!map_o->pg_dsn->use) buffer_add_str(map_o->pg_dsn, yytext);<br><br> return;<br>
}<br>}<br><br>after some test, it's seems to work<br>could it be problematic ?<br><br><br></span></span>
</div><br>