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

avoid genalloc usage

parent 029304ce
No related branches found
No related tags found
No related merge requests found
......@@ -23,24 +23,24 @@
#include <66/resolve.h>
#include <66/ssexec.h>
int svc_send(ssexec_t *info,genalloc *ga,char const *sig,char const *const *envp)
int svc_send(ssexec_t *info, resolve_service_t *sv, unsigned int len, char const *sig)
{
log_flow() ;
size_t i = 0 ;
int nargc = 3 + genalloc_len(resolve_service_t,ga) ;
unsigned int pos = 0 ;
int nargc = 3 + len ;
char const *newargv[nargc] ;
unsigned int m = 0 ;
newargv[m++] = "fake_name" ;
newargv[m++] = "svc_send" ;
newargv[m++] = sig ;
for (; i < genalloc_len(resolve_service_t,ga) ; i++)
newargv[m++] = genalloc_s(resolve_service_t,ga)[i].sa.s + genalloc_s(resolve_service_t,ga)[i].name ;
for (; pos < len ; pos++)
newargv[m++] = sv[pos].sa.s + sv[pos].name ;
newargv[m++] = 0 ;
if (ssexec_svctl(nargc,newargv,envp,info))
if (ssexec_svctl(nargc, newargv, (char const *const *) environ, info))
return 0 ;
return 1 ;
......
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