Minor changes

This commit is contained in:
Loic Guegan 2023-07-16 12:25:28 +02:00
parent c06d284b70
commit c61c717fbb

View file

@ -54,9 +54,14 @@ int main (int argc, char *argv [])
interval=atoi(token);
if(line==4){
printf("Data received with key=%s\n",key);
printf("Data received: key=%s client=%s interval=%ld\n",key, client, interval);
char path[STATIC_LEN]="";
sprintf(path,"%s/%s_%s_%ld",cdatadir,key,client,interval);
//sprintf(path,"%s/%s_%s_%ld",cdatadir,key,client,interval);
sprintf(path,"%s/%s/%s/",cdatadir,key,client);
if(!DIR_EXISTS(path)){
mkdirp(path);
}
sprintf(path,"%s/%s/%s/%ld",cdatadir,key,client,interval);
fptr=fopen(path,"a");
}