From: Friedrich L. <fr...@us...> - 2004-05-09 23:13:50
|
Update of /cvsroot/ipac-ng/ipac-ng In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32135 Modified Files: fetchipac.c Log Message: fix problem with unspooling data from spool file make remark about hostname "problem" in storage/postgre/postgre.c more clear Index: fetchipac.c =================================================================== RCS file: /cvsroot/ipac-ng/ipac-ng/fetchipac.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- fetchipac.c 19 Nov 2003 03:55:12 -0000 1.16 +++ fetchipac.c 9 May 2004 23:13:40 -0000 1.17 @@ -485,6 +485,7 @@ int spool_record(const data_record_type *dr) { FILE *f; + char *ahost_saved; int mof; int ret; @@ -497,6 +498,10 @@ mof = machine_output_format; machine_output_format = 1; + /* we have to use the ahost - see storage/postgre for details why + the hostname in the rules itself is ignored */ + ahost_saved = ahost; + ahost = dr->machine_name; ret = 0; if (print_records(f, 1, dr) != 0) { fprintf(stderr, "%s: cant write data record to spool file \"" @@ -506,6 +511,7 @@ } fputs("\n", f); fclose(f); + ahost = ahost_saved; machine_output_format = mof; return ret; } |