Skip to content
Snippets Groups Projects
Commit 826fd40f authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

nothing to see

parent 09e3108a
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ int instance_check(char const *svname) ...@@ -23,7 +23,7 @@ int instance_check(char const *svname)
{ {
log_flow() ; log_flow() ;
int r ; int r = 0 ;
r = get_len_until(svname,'@') ; r = get_len_until(svname,'@') ;
// avoid empty value after the instance template name // avoid empty value after the instance template name
if (strlen(svname+r) <= 1 && r > 0) return 0 ; if (strlen(svname+r) <= 1 && r > 0) return 0 ;
......
...@@ -26,6 +26,7 @@ int instance_create(stralloc *sasv,char const *svname, char const *regex, int le ...@@ -26,6 +26,7 @@ int instance_create(stralloc *sasv,char const *svname, char const *regex, int le
{ {
log_flow() ; log_flow() ;
int e = 0 ;
char const *copy ; char const *copy ;
size_t tlen = len + 1 ; size_t tlen = len + 1 ;
...@@ -39,11 +40,16 @@ int instance_create(stralloc *sasv,char const *svname, char const *regex, int le ...@@ -39,11 +40,16 @@ int instance_create(stralloc *sasv,char const *svname, char const *regex, int le
log_warnu("replace instance character for service: ",svname) ; log_warnu("replace instance character for service: ",svname) ;
goto err ; goto err ;
} }
if (!stralloc_copy(sasv,&tmp)) goto err ;
stralloc_free(&tmp) ;
return 1 ; stralloc_0(&tmp) ;
sasv->len = 0 ;
if (!auto_stra(sasv, tmp.s))
goto err ;
e = 1 ;
err: err:
stralloc_free(&tmp) ; stralloc_free(&tmp) ;
return 0 ; return e ;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment