[Refdb-cvs] CVS: refdb/src backend-bibtex.c,1.15,1.16 dbfncs.c,1.14,1.15 refdb-client.c,1.25,1.26 re
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <mho...@us...> - 2004-01-29 05:59:35
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18825 Modified Files: backend-bibtex.c dbfncs.c refdb-client.c refdba.c refdbc.c refdbd.c refdbda.c refdbdbib.c refdbdnote.c refdbdref.c refdbib.c risdb.c xmlout.c Log Message: use tiwrite() instead of iwrite() where appropriate Index: backend-bibtex.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-bibtex.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -U2 -r1.15 -r1.16 --- backend-bibtex.c 3 Jan 2004 20:11:43 -0000 1.15 +++ backend-bibtex.c 29 Jan 2004 01:42:06 -0000 1.16 @@ -828,5 +828,5 @@ /* send acknowledgement to client */ - numbyte = iwrite(ptr_clrequest->fd, positive.text, positive.length+1); + numbyte = tiwrite(ptr_clrequest->fd, positive.text, TERM_YES); if (numbyte == -1) { LOG_PRINT(LOG_INFO, "could not write to client"); @@ -938,5 +938,5 @@ rendinfo.dbires = dbi_conn_query(conn, sql_command); if (!rendinfo.dbires) { - iwrite(ptr_clrequest->fd, "select failed\n", 14); + tiwrite(ptr_clrequest->fd, "select failed\n", TERM_NO); dbi_conn_close(conn); delete_all_lilimem(&sentinel); @@ -999,5 +999,5 @@ dbi_conn_close(conn); - iwrite(ptr_clrequest->fd, "", 1); /* finish sending data */ + tiwrite(ptr_clrequest->fd, "", TERM_YES); /* finish sending data */ /* wait for receipt from client, reuse sql_command */ Index: dbfncs.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/dbfncs.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -U2 -r1.14 -r1.15 --- dbfncs.c 25 Jan 2004 13:21:29 -0000 1.14 +++ dbfncs.c 29 Jan 2004 01:42:11 -0000 1.15 @@ -137,5 +137,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_meta failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_meta failed\n", TERM_NO); return 1; } @@ -193,5 +193,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_refdb failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_refdb failed\n", TERM_NO); return 1; } @@ -212,5 +212,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_author failed\n", 23); + tiwrite(ptr_clrequest->fd, "create t_author failed\n", TERM_NO); return 1; } @@ -227,5 +227,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_keyword failed\n", 24); + tiwrite(ptr_clrequest->fd, "create t_keyword failed\n", TERM_NO); return 1; } @@ -248,5 +248,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_periodical failed\n", 27); + tiwrite(ptr_clrequest->fd, "create t_periodical failed\n", TERM_NO); return 1; } @@ -272,5 +272,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_note failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_note failed\n", TERM_NO); return 1; } @@ -288,5 +288,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_user failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_user failed\n", TERM_NO); return 1; } @@ -308,5 +308,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xauthor failed\n", 24); + tiwrite(ptr_clrequest->fd, "create t_xauthor failed\n", TERM_NO); return 1; } @@ -326,5 +326,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xkeyword failed\n", 25); + tiwrite(ptr_clrequest->fd, "create t_xkeyword failed\n", TERM_NO); return 1; } @@ -347,5 +347,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xuser failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_xuser failed\n", TERM_NO); return 1; } @@ -365,5 +365,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xnote failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_xnote failed\n", TERM_NO); return 1; } @@ -390,5 +390,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_meta failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_meta failed\n", TERM_NO); return 1; } @@ -442,5 +442,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_refdb failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_refdb failed\n", TERM_NO); return 1; } @@ -453,5 +453,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical failed\n", 27); + tiwrite(ptr_clrequest->fd, "create i_periodical failed\n", TERM_NO); return 1; } @@ -472,5 +472,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_author failed\n", 23); + tiwrite(ptr_clrequest->fd, "create t_author failed\n", TERM_NO); return 1; } @@ -483,5 +483,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_author_name failed\n", 28); + tiwrite(ptr_clrequest->fd, "create i_author_name failed\n", TERM_NO); return 1; } @@ -498,5 +498,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_keyword failed\n", 24); + tiwrite(ptr_clrequest->fd, "create t_keyword failed\n", TERM_NO); return 1; } @@ -509,5 +509,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_keyword_name failed\n", 29); + tiwrite(ptr_clrequest->fd, "create i_keyword_name failed\n", TERM_NO); return 1; } @@ -527,5 +527,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_periodical failed\n", 27); + tiwrite(ptr_clrequest->fd, "create t_periodical failed\n", TERM_NO); return 1; } @@ -538,5 +538,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_name failed\n", 32); + tiwrite(ptr_clrequest->fd, "create i_periodical_name failed\n", TERM_NO); return 1; } @@ -548,5 +548,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_abbrev failed\n", 34); + tiwrite(ptr_clrequest->fd, "create i_periodical_abbrev failed\n", TERM_NO); return 1; } @@ -558,5 +558,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_custabbrev1 failed\n", 39); + tiwrite(ptr_clrequest->fd, "create i_periodical_custabbrev1 failed\n", TERM_NO); return 1; } @@ -568,5 +568,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_custabbrev2 failed\n", 39); + tiwrite(ptr_clrequest->fd, "create i_periodical_custabbrev2 failed\n", TERM_NO); return 1; } @@ -589,5 +589,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_note failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_note failed\n", TERM_NO); return 1; } @@ -600,5 +600,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_note_title failed\n", 27); + tiwrite(ptr_clrequest->fd, "create i_note_title failed\n", TERM_NO); return 1; } @@ -610,5 +610,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_note_user_id failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_note_user_id failed\n", TERM_NO); return 1; } @@ -620,5 +620,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_note_date failed\n", 27); + tiwrite(ptr_clrequest->fd, "create i_note_date failed\n", TERM_NO); return 1; } @@ -636,5 +636,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_user failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_user failed\n", TERM_NO); return 1; } @@ -647,5 +647,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_user_name failed\n", 26); + tiwrite(ptr_clrequest->fd, "create i_user_name failed\n", TERM_NO); return 1; } @@ -666,5 +666,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xauthor failed\n", 24); + tiwrite(ptr_clrequest->fd, "create t_xauthor failed\n", TERM_NO); return 1; } @@ -677,5 +677,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xauthor_author_id failed\n", 34); + tiwrite(ptr_clrequest->fd, "create i_xauthor_author_id failed\n", TERM_NO); return 1; } @@ -687,5 +687,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xauthor_refdb_id failed\n", 33); + tiwrite(ptr_clrequest->fd, "create i_xauthor_refdb_id failed\n", TERM_NO); return 1; } @@ -704,5 +704,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xkeyword failed\n", 25); + tiwrite(ptr_clrequest->fd, "create t_xkeyword failed\n", TERM_NO); return 1; } @@ -715,5 +715,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xkeyword_keyword_id failed\n", 36); + tiwrite(ptr_clrequest->fd, "create i_xkeyword_keyword_id failed\n", TERM_NO); return 1; } @@ -725,5 +725,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xkeyword_xref_id failed\n", 33); + tiwrite(ptr_clrequest->fd, "create i_xkeyword_xref_id failed\n", TERM_NO); return 1; } @@ -745,5 +745,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xuser failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_xuser failed\n", TERM_NO); return 1; } @@ -756,5 +756,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xuser_user_id failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_xuser_user_id failed\n", TERM_NO); return 1; } @@ -766,5 +766,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xuser_refdb_id failed\n", 31); + tiwrite(ptr_clrequest->fd, "create i_xuser_refdb_id failed\n", TERM_NO); return 1; } @@ -783,5 +783,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xnote failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_xnote failed\n", TERM_NO); return 1; } @@ -794,5 +794,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xnote_note_id failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_xnote_note_id failed\n", TERM_NO); return 1; } @@ -804,5 +804,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xnote_xref_id failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_xnote_xref_id failed\n", TERM_NO); return 1; } @@ -814,5 +814,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xnote_xnote_type failed\n", 33); + tiwrite(ptr_clrequest->fd, "create i_xnote_xnote_type failed\n", TERM_NO); return 1; } @@ -833,5 +833,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "CREATE GROUP failed\n", 20); + tiwrite(ptr_clrequest->fd, "CREATE GROUP failed\n", TERM_NO); return 1; } @@ -844,5 +844,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "GRANT failed for new tables\n", 28); + tiwrite(ptr_clrequest->fd, "GRANT failed for new tables\n", TERM_NO); return 1; } @@ -868,5 +868,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_meta failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_meta failed\n", TERM_NO); return 1; } @@ -912,5 +912,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_refdb failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_refdb failed\n", TERM_NO); return 1; } @@ -923,5 +923,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_refdb_pubyear failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_refdb_pubyear failed\n", TERM_NO); return 1; } @@ -933,5 +933,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_refdb_citekey failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_refdb_citekey failed\n", TERM_NO); return 1; } @@ -950,5 +950,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_author failed\n", 23); + tiwrite(ptr_clrequest->fd, "create t_author failed\n", TERM_NO); return 1; } @@ -961,5 +961,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_author_name failed\n", 28); + tiwrite(ptr_clrequest->fd, "create i_author_name failed\n", TERM_NO); return 1; } @@ -974,5 +974,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_keyword failed\n", 24); + tiwrite(ptr_clrequest->fd, "create t_keyword failed\n", TERM_NO); return 1; } @@ -985,5 +985,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_keyword_name failed\n", 29); + tiwrite(ptr_clrequest->fd, "create i_keyword_name failed\n", TERM_NO); return 1; } @@ -1001,5 +1001,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_periodical failed\n", 27); + tiwrite(ptr_clrequest->fd, "create t_periodical failed\n", TERM_NO); return 1; } @@ -1012,5 +1012,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_name failed\n", 32); + tiwrite(ptr_clrequest->fd, "create i_periodical_name failed\n", TERM_NO); return 1; } @@ -1022,5 +1022,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_abbrev failed\n", 34); + tiwrite(ptr_clrequest->fd, "create i_periodical_abbrev failed\n", TERM_NO); return 1; } @@ -1032,5 +1032,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_custabbrev failed\n", 38); + tiwrite(ptr_clrequest->fd, "create i_periodical_custabbrev failed\n", TERM_NO); return 1; } @@ -1042,5 +1042,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_periodical_custabbrev failed\n", 38); + tiwrite(ptr_clrequest->fd, "create i_periodical_custabbrev failed\n", TERM_NO); return 1; } @@ -1061,5 +1061,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_note failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_note failed\n", TERM_NO); return 1; } @@ -1072,5 +1072,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_note_title failed\n", 27); + tiwrite(ptr_clrequest->fd, "create i_note_title failed\n", TERM_NO); return 1; } @@ -1082,5 +1082,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_note_note_userid failed\n", 33); + tiwrite(ptr_clrequest->fd, "create i_note_note_userid failed\n", TERM_NO); return 1; } @@ -1092,5 +1092,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_note_date failed\n", 26); + tiwrite(ptr_clrequest->fd, "create i_note_date failed\n", TERM_NO); return 1; } @@ -1105,5 +1105,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_user failed\n", 21); + tiwrite(ptr_clrequest->fd, "create t_user failed\n", TERM_NO); return 1; } @@ -1116,5 +1116,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_user_name failed\n", 26); + tiwrite(ptr_clrequest->fd, "create i_user_name failed\n", TERM_NO); return 1; } @@ -1133,5 +1133,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xauthor failed\n", 24); + tiwrite(ptr_clrequest->fd, "create t_xauthor failed\n", TERM_NO); return 1; } @@ -1144,5 +1144,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xauthor_autid failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_xauthor_autid failed\n", TERM_NO); return 1; } @@ -1154,5 +1154,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xauthor_refid failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_xauthor_refid failed\n", TERM_NO); return 1; } @@ -1169,5 +1169,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xkeyword failed\n", 25); + tiwrite(ptr_clrequest->fd, "create t_xkeyword failed\n", TERM_NO); return 1; } @@ -1180,5 +1180,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xkeyword_kwid failed\n", 30); + tiwrite(ptr_clrequest->fd, "create i_xkeyword_kwid failed\n", TERM_NO); return 1; } @@ -1190,5 +1190,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xkeyword_xrefid failed\n", 32); + tiwrite(ptr_clrequest->fd, "create i_xkeyword_xrefid failed\n", TERM_NO); return 1; } @@ -1208,5 +1208,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xuser failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_xuser failed\n", TERM_NO); return 1; } @@ -1219,5 +1219,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xuser_userid failed\n", 29); + tiwrite(ptr_clrequest->fd, "create i_xuser_userid failed\n", TERM_NO); return 1; } @@ -1229,5 +1229,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xuser_refid failed\n", 28); + tiwrite(ptr_clrequest->fd, "create i_xuser_refid failed\n", TERM_NO); return 1; } @@ -1244,5 +1244,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create t_xnote failed\n", 22); + tiwrite(ptr_clrequest->fd, "create t_xnote failed\n", TERM_NO); return 1; } @@ -1255,5 +1255,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xnote_noteid failed\n", 29); + tiwrite(ptr_clrequest->fd, "create i_xnote_noteid failed\n", TERM_NO); return 1; } @@ -1265,5 +1265,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "create i_xnote_xrefid failed\n", 29); + tiwrite(ptr_clrequest->fd, "create i_xnote_xrefid failed\n", TERM_NO); return 1; } Index: refdb-client.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdb-client.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -U2 -r1.25 -r1.26 --- refdb-client.c 26 Dec 2003 01:23:47 -0000 1.25 +++ refdb-client.c 29 Jan 2004 01:42:12 -0000 1.26 @@ -173,5 +173,5 @@ sprintf(outbuffer, "%d", REFDB_PROTOCOL_VERSION); - numbyte = iwrite(n_sockfd, outbuffer, strlen(outbuffer)+1); + numbyte = tiwrite(n_sockfd, outbuffer, TERM_YES); if (numbyte == -1) { cgi_header(CGI_PLAIN); @@ -341,5 +341,5 @@ errstream = (n_cgi) ? stdout : stderr; - numbyte = iwrite(slvals->n_sockfd, slvals->outbuffer, strlen(slvals->outbuffer)+1); + numbyte = tiwrite(slvals->n_sockfd, slvals->outbuffer, TERM_YES); if (numbyte == -1) { cgi_header(CGI_PLAIN); @@ -380,5 +380,5 @@ n_read_done++; /* send back confirmation to the server */ - iwrite(slvals->n_sockfd, "POS", 4); + tiwrite(slvals->n_sockfd, "POS", TERM_YES); } @@ -398,5 +398,5 @@ } - iwrite(slvals->n_sockfd, "POS", 4); + tiwrite(slvals->n_sockfd, "POS", TERM_YES); } } while (!n_read_done); @@ -540,5 +540,5 @@ if (n_result < n_chunksize && !feof(infp)) { fprintf(errstream, "data read error. Stop.\n"); - iwrite(n_sockfd, "QUIT", 5); + tiwrite(n_sockfd, "QUIT", TERM_YES); /* read response from server */ @@ -552,5 +552,5 @@ else { /* send back confirmation to the server */ - iwrite(n_sockfd, "POS", 4); + tiwrite(n_sockfd, "POS", TERM_YES); } @@ -565,5 +565,5 @@ /* send length information to database server */ sprintf(thebytes, "%d", n_result); - numbyte = iwrite(n_sockfd, thebytes, 10); /* is 10 on the safe side? */ + numbyte = tiwrite(n_sockfd, thebytes, TERM_YES); /* is 10 on the safe side? */ /* printf("%s\n", thebytes); */ @@ -697,5 +697,5 @@ cgi_header(CGI_PLAIN); fprintf(errstream, "data read error. Stop.\n"); - iwrite(n_sockfd, "QUIT", 5); + tiwrite(n_sockfd, "QUIT", TERM_YES); return 1; } @@ -711,5 +711,5 @@ /* send length information to database server */ sprintf(thebytes, "%d", *ptr_n_setlength); - numbyte = iwrite(n_sockfd, thebytes, 10); /* is 10 on the safe side? */ + numbyte = tiwrite(n_sockfd, thebytes, TERM_YES); /* is 10 on the safe side? */ /* printf("%s\n", thebytes); */ Index: refdba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdba.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -U2 -r1.41 -r1.42 --- refdba.c 1 Jun 2003 17:57:19 -0000 1.41 +++ refdba.c 29 Jan 2004 01:42:13 -0000 1.42 @@ -985,5 +985,5 @@ /* now send the command to the application server */ /* fprintf(stderr, "%s\n", outbuffer); */ - numbyte = iwrite(n_sockfd, outbuffer, strlen(outbuffer)+1); + numbyte = tiwrite(n_sockfd, outbuffer, TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1081,5 +1081,5 @@ } - numbyte = iwrite(n_sockfd, send_buffer, strlen(send_buffer)+1); /* incl.\0 */ + numbyte = tiwrite(n_sockfd, send_buffer, TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1107,5 +1107,5 @@ n_read_done++; /* send back confirmation to the server */ - iwrite(n_sockfd, "POS", 4); + tiwrite(n_sockfd, "POS", TERM_YES); } @@ -1349,5 +1349,5 @@ /* now send the command to the application server */ - numbyte = iwrite(n_sockfd, outbuffer, strlen(outbuffer)+1); + numbyte = tiwrite(n_sockfd, outbuffer, TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1445,5 +1445,5 @@ } - numbyte = iwrite(n_sockfd, send_buffer, strlen(send_buffer)+1); /* incl.\0 */ + numbyte = tiwrite(n_sockfd, send_buffer, TERM_YES); /* incl.\0 */ if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1471,5 +1471,5 @@ n_read_done++; /* send back confirmation to the server */ - iwrite(n_sockfd, "POS", 4); + tiwrite(n_sockfd, "POS", TERM_YES); } @@ -1706,5 +1706,5 @@ /* now send the command to the application server */ /* printf("%s\n", outbuffer); */ - numbyte = iwrite(n_sockfd, outbuffer, strlen(outbuffer)+1); + numbyte = tiwrite(n_sockfd, outbuffer, TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1777,5 +1777,5 @@ /* signal server that this file is done */ sprintf(thebytes, "%d", 0); - numbyte = iwrite(n_sockfd, thebytes, 10); + numbyte = tiwrite(n_sockfd, thebytes, TERM_YES); /* printf("%s\n", thebytes); */ if (numbyte == -1) { @@ -1826,5 +1826,5 @@ /* PHASE 6 */ /* signal server we're done */ - numbyte = iwrite(n_sockfd, "QUIT", 5); + numbyte = tiwrite(n_sockfd, "QUIT", TERM_YES); /* printf("%s\n", thebytes); */ if (numbyte == -1) { @@ -1882,5 +1882,5 @@ /* send back confirmation to the server */ - iwrite(n_sockfd, "POS", 4); + tiwrite(n_sockfd, "POS", TERM_YES); /* reset */ Index: refdbc.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbc.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -U2 -r1.63 -r1.64 --- refdbc.c 25 Jan 2004 13:25:52 -0000 1.63 +++ refdbc.c 29 Jan 2004 01:42:15 -0000 1.64 @@ -1175,5 +1175,5 @@ /* send command to application server */ - numbyte = iwrite(slvals.n_sockfd, cmd_buffer, strlen(cmd_buffer)+1); + numbyte = tiwrite(slvals.n_sockfd, cmd_buffer, TERM_YES); LOG_PRINT(LOG_DEBUG, cmd_buffer); if (numbyte == -1) { @@ -1553,5 +1553,5 @@ /* send command to application server */ - numbyte = iwrite(slvals.n_sockfd, cmd_buffer, strlen(cmd_buffer)+1); + numbyte = tiwrite(slvals.n_sockfd, cmd_buffer, TERM_YES); LOG_PRINT(LOG_DEBUG, cmd_buffer); if (numbyte == -1) { @@ -3147,5 +3147,5 @@ LOG_PRINT(LOG_DEBUG, outbuffer); - numbyte = iwrite(n_sockfd, outbuffer, strlen(outbuffer)+1); + numbyte = tiwrite(n_sockfd, outbuffer, TERM_YES); /* printf("%s\n", outbuffer); */ @@ -3248,5 +3248,5 @@ /* printf("%s\n", thebytes); */ - numbyte = iwrite(n_sockfd, thebytes, 10); + numbyte = tiwrite(n_sockfd, thebytes, TERM_YES); if (numbyte == -1) { @@ -3305,5 +3305,5 @@ /* send back confirmation to the server */ - iwrite(n_sockfd, "POS", 4); + tiwrite(n_sockfd, "POS", TERM_YES); /* reset */ @@ -3819,5 +3819,5 @@ LOG_PRINT(LOG_DEBUG, outbuffer); - numbyte = iwrite(n_sockfd, outbuffer, strlen(outbuffer)+1); + numbyte = tiwrite(n_sockfd, outbuffer, TERM_YES); /* printf("%s\n", outbuffer); */ @@ -3910,5 +3910,5 @@ /* printf("%s\n", thebytes); */ - numbyte = iwrite(n_sockfd, thebytes, 10); + numbyte = tiwrite(n_sockfd, thebytes, TERM_YES); if (numbyte == -1) { @@ -3963,5 +3963,5 @@ /* send back confirmation to the server */ - iwrite(n_sockfd, "POS", 4); + tiwrite(n_sockfd, "POS", TERM_YES); /* reset */ @@ -4271,5 +4271,5 @@ /* send command to application server */ - numbyte = iwrite(slvals.n_sockfd, cmd_buffer, strlen(cmd_buffer)+1); + numbyte = tiwrite(slvals.n_sockfd, cmd_buffer, TERM_YES); LOG_PRINT(LOG_DEBUG, cmd_buffer); if (numbyte == -1) { Index: refdbd.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -U2 -r1.70 -r1.71 --- refdbd.c 25 Jan 2004 13:28:20 -0000 1.70 +++ refdbd.c 29 Jan 2004 01:42:27 -0000 1.71 @@ -861,5 +861,5 @@ if (child_inbuffer[numbyte-1] != '\0' || strlen(child_inbuffer) > PROTOCOL_LENGTH) { /* if transmission incomplete or protocol version string too long */ LOG_PRINT(LOG_CRIT, "invalid client request"); - iwrite(ptr_child_clrequest->fd, "invalid client request", 23); + tiwrite(ptr_child_clrequest->fd, "invalid client request", TERM_YES); retval = 1; goto cleanup; @@ -882,10 +882,10 @@ /* send pseudo-random string to client */ - iwrite(ptr_child_clrequest->fd, wheelpos, strlen(wheelpos)+1); + tiwrite(ptr_child_clrequest->fd, wheelpos, TERM_YES); LOG_PRINT(LOG_DEBUG, "send pseudo-random string to client"); numbyte = tread(ptr_child_clrequest->fd, child_inbuffer, COMMAND_INBUF_LEN-1); if (child_inbuffer[numbyte-1] != '\0') { /* if transmission incomplete */ LOG_PRINT(LOG_CRIT, "incomplete client command"); - iwrite(ptr_child_clrequest->fd, "incomplete client command", 26); + tiwrite(ptr_child_clrequest->fd, "incomplete client command", TERM_YES); retval = 1; goto cleanup; @@ -905,5 +905,5 @@ if (ptr_child_clrequest->inargv == NULL) { LOG_PRINT(LOG_CRIT, outomem.text); - iwrite(ptr_child_clrequest->fd, outomem.text, outomem.length+1); + tiwrite(ptr_child_clrequest->fd, outomem.text, TERM_YES); retval = 1; goto cleanup; @@ -916,10 +916,10 @@ if (result == 1) { /* memory error */ LOG_PRINT(LOG_CRIT, outomem.text); - iwrite(ptr_child_clrequest->fd, outomem.text, outomem.length+1); + tiwrite(ptr_child_clrequest->fd, outomem.text, TERM_YES); retval = 1; goto cleanup; } else if (result == 2) { /* empty command line */ - iwrite(ptr_child_clrequest->fd, "enter a command", 16); + tiwrite(ptr_child_clrequest->fd, "enter a command", TERM_YES); retval = 1; goto cleanup; @@ -1068,9 +1068,9 @@ break; case ':': - iwrite(ptr_child_clrequest->fd, "missing option", 15); + tiwrite(ptr_child_clrequest->fd, "missing option", TERM_YES); n_cmdlinerror = 1; break; case '?': - iwrite(ptr_child_clrequest->fd, "unknown option", 15); + tiwrite(ptr_child_clrequest->fd, "unknown option", TERM_YES); n_cmdlinerror = 1; break; @@ -1261,13 +1261,13 @@ else { iwrite(ptr_child_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_child_clrequest->fd, html_head, strlen(html_head)); + tiwrite(ptr_child_clrequest->fd, html_head, TERM_NO); free(html_head); if (addresult.success) { - iwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Reference was successfully added</td></tr>", 72); + tiwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Reference was successfully added</td></tr>", TERM_NO); } else { - iwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Adding reference failed</td></tr>", 63); + tiwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Adding reference failed</td></tr>", TERM_NO); } - iwrite(ptr_child_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_child_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -1294,16 +1294,16 @@ else { iwrite(ptr_child_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_child_clrequest->fd, html_head, strlen(html_head)); + tiwrite(ptr_child_clrequest->fd, html_head, TERM_NO); free(html_head); if (addresult.updated) { - iwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Reference was successfully updated</td></tr>", 74); + tiwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Reference was successfully updated</td></tr>", TERM_NO); } else if (addresult.success) { - iwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Reference was successfully added</td></tr>", 72); + tiwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Reference was successfully added</td></tr>", TERM_NO); } else { - iwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Adding reference failed</td></tr>", 63); + tiwrite(ptr_child_clrequest->fd, "<tbody><tr><td class=\"result\">Adding reference failed</td></tr>", TERM_NO); } - iwrite(ptr_child_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_child_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -1333,5 +1333,5 @@ else { iwrite(ptr_child_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_child_clrequest->fd, html_head, strlen(html_head)); + tiwrite(ptr_child_clrequest->fd, html_head, TERM_NO); free(html_head); } @@ -1355,8 +1355,8 @@ } if (ptr_child_clrequest->n_cgi) { /* cgi output */ - iwrite(ptr_child_clrequest->fd, child_returnmsg, strlen(child_returnmsg)); + tiwrite(ptr_child_clrequest->fd, child_returnmsg, TERM_NO); child_returnmsg[0] = '\0'; /* reset return string */ - iwrite(ptr_child_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_child_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -1382,5 +1382,5 @@ else { iwrite(ptr_child_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_child_clrequest->fd, html_head, strlen(html_head)); + tiwrite(ptr_child_clrequest->fd, html_head, TERM_NO); free(html_head); } @@ -1425,8 +1425,8 @@ if (ptr_child_clrequest->n_cgi) { /* cgi output */ - iwrite(ptr_child_clrequest->fd, child_returnmsg, strlen(child_returnmsg)); + tiwrite(ptr_child_clrequest->fd, child_returnmsg, TERM_NO); child_returnmsg[0] = '\0'; /* reset return string */ - iwrite(ptr_child_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_child_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -1448,5 +1448,5 @@ sprintf(child_returnmsg, ULLSPEC" reference(s) retrieved\n", (unsigned long long)n_refs); /* terminate string */ - iwrite(ptr_child_clrequest->fd, "", 1); + tiwrite(ptr_child_clrequest->fd, "", TERM_YES); /* wait for receipt from client */ @@ -1519,5 +1519,5 @@ sprintf(child_returnmsg, ULLSPEC" note(s) retrieved\n", (unsigned long long)n_notes); /* terminate string */ - iwrite(ptr_child_clrequest->fd, "", 1); + tiwrite(ptr_child_clrequest->fd, "", TERM_YES); /* wait for receipt from client */ @@ -1699,8 +1699,8 @@ /* finish dialog with client */ if (child_returnmsg) { - iwrite(ptr_child_clrequest->fd, child_returnmsg, strlen(child_returnmsg)+1); /* include \0 */ + tiwrite(ptr_child_clrequest->fd, child_returnmsg, TERM_YES); } else { - iwrite(ptr_child_clrequest->fd, "no luck today", 14); + tiwrite(ptr_child_clrequest->fd, "no luck today", TERM_YES); } Index: refdbda.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbda.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -U2 -r1.38 -r1.39 --- refdbda.c 17 Jan 2004 23:05:57 -0000 1.38 +++ refdbda.c 29 Jan 2004 01:42:29 -0000 1.39 @@ -107,5 +107,5 @@ if (!n_remote_admin) { - iwrite(ptr_clrequest->fd, "remote administration disabled\n", 31); + tiwrite(ptr_clrequest->fd, "remote administration disabled\n", TERM_NO); return; } @@ -128,5 +128,5 @@ if (ptr_clrequest->inargc == *(ptr_clrequest->ptr_optind)+1 && strcmp(ptr_clrequest->inargv[*(ptr_clrequest->ptr_optind)], "ping") == 0) { sprintf(outbuffer, "parent PID: %d child PID: %d\n", parent_pid, getpid()); - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); free(sql_command); return; @@ -173,9 +173,9 @@ LOG_PRINT(LOG_DEBUG, sql_command); if (!dbires1) { - iwrite(ptr_clrequest->fd, "error while deleting temp tables\n", 33); + tiwrite(ptr_clrequest->fd, "error while deleting temp tables\n", TERM_NO); LOG_PRINT(LOG_WARNING, "error while deleting temp tables"); } else { - iwrite(ptr_clrequest->fd, "successfully deleted temp tables\n", 33); + tiwrite(ptr_clrequest->fd, "successfully deleted temp tables\n", TERM_NO); LOG_PRINT(LOG_INFO, "temp tables deleted"); dbi_result_free(dbires1); @@ -183,5 +183,5 @@ } else { /* no temp tables in database */ - iwrite(ptr_clrequest->fd, "nothing to do\n", 14); + tiwrite(ptr_clrequest->fd, "nothing to do\n", TERM_NO); } dbi_result_free(dbires); @@ -198,15 +198,15 @@ if ((fd_fifo = open(the_fifo, O_WRONLY)) == -1) { LOG_PRINT(LOG_WARNING, "cannot open FIFO for writing"); - iwrite(ptr_clrequest->fd, "confserv: remote configure not possible\n", 40); + tiwrite(ptr_clrequest->fd, "confserv: remote configure not possible\n", TERM_NO); return; } } else { - iwrite(ptr_clrequest->fd, "confserv: remote configure not possible\n", 40); + tiwrite(ptr_clrequest->fd, "confserv: remote configure not possible\n", TERM_NO); return; } #else if (access(the_fifo, F_OK) != -1) { /* old file still exists */ - iwrite(ptr_clrequest->fd, "confserv: appserver busy, try again later\n", 42); + tiwrite(ptr_clrequest->fd, "confserv: appserver busy, try again later\n", TERM_NO); return; } @@ -214,5 +214,5 @@ if ((fd_fifo = open(the_fifo, O_WRONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR)) == -1) { LOG_PRINT(LOG_WARNING, "cannot open FIFO for writing"); - iwrite(ptr_clrequest->fd, "confserv: remote configure not possible\n", 40); + tiwrite(ptr_clrequest->fd, "confserv: remote configure not possible\n", TERM_NO); return; } @@ -223,5 +223,5 @@ an optional argument */ if (ptr_clrequest->inargc == *(ptr_clrequest->ptr_optind)) { /* no argument given */ - iwrite(ptr_clrequest->fd, "confserv: wrong or incomplete command\n", 38); + tiwrite(ptr_clrequest->fd, "confserv: wrong or incomplete command\n", TERM_NO); } @@ -229,14 +229,14 @@ if (strcmp(ptr_clrequest->inargv[*(ptr_clrequest->ptr_optind)], "stop") == 0) { if (write(fd_fifo, "1stop", 6) == -1) { - iwrite(ptr_clrequest->fd, "write error in FIFO\n", 20); + tiwrite(ptr_clrequest->fd, "write error in FIFO\n", TERM_NO); LOG_PRINT(LOG_WARNING, "write error in FIFO"); } else { - iwrite(ptr_clrequest->fd, "application server stop submitted\n", 34); + tiwrite(ptr_clrequest->fd, "application server stop submitted\n", TERM_NO); LOG_PRINT(LOG_INFO, "application server stop submitted"); } } else { - iwrite(ptr_clrequest->fd, "confserv: wrong or incomplete command\n", 38); + tiwrite(ptr_clrequest->fd, "confserv: wrong or incomplete command\n", TERM_NO); } } @@ -245,9 +245,9 @@ strcpy(ptr_clrequest->server_ip, ptr_clrequest->inargv[*(ptr_clrequest->ptr_optind)+1]); sprintf(outbuffer, "set serverip to %s submitted\n", ptr_clrequest->server_ip); - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); sprintf(outbuffer, "2serverip %s", ptr_clrequest->server_ip); if (write(fd_fifo, outbuffer, strlen(outbuffer) + 1) == -1) { - iwrite(ptr_clrequest->fd, "write error in FIFO\n", 20); + tiwrite(ptr_clrequest->fd, "write error in FIFO\n", TERM_NO); LOG_PRINT(LOG_WARNING, "write error in FIFO"); } @@ -260,9 +260,9 @@ n_refdb_timeout = atoi(refdb_timeout); sprintf(outbuffer, "set timeout to %d seconds submitted\n", n_refdb_timeout); - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); sprintf(outbuffer, "2timeout %s", refdb_timeout); if (write(fd_fifo, outbuffer, strlen(outbuffer) + 1) == -1) { - iwrite(ptr_clrequest->fd, "write error in FIFO\n", 20); + tiwrite(ptr_clrequest->fd, "write error in FIFO\n", TERM_NO); LOG_PRINT(LOG_WARNING, "write error in FIFO"); } @@ -274,9 +274,9 @@ strcpy(log_file, ptr_clrequest->inargv[*(ptr_clrequest->ptr_optind)+1]); sprintf(outbuffer, "set logfile to %s submitted\n", log_file); - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); sprintf(outbuffer, "2logfile %s", log_file); if (write(fd_fifo, outbuffer, strlen(outbuffer) + 1) == -1) { - iwrite(ptr_clrequest->fd, "write error in FIFO\n", 20); + tiwrite(ptr_clrequest->fd, "write error in FIFO\n", TERM_NO); LOG_PRINT(LOG_WARNING, "write error in FIFO"); } @@ -289,9 +289,9 @@ n_log_dest = atoi(log_dest); sprintf(outbuffer, "set logdest to %d\n", n_log_dest); - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); sprintf(outbuffer, "2logdest %s", log_dest); if (write(fd_fifo, outbuffer, strlen(outbuffer) + 1) == -1) { - iwrite(ptr_clrequest->fd, "write error in FIFO\n", 20); + tiwrite(ptr_clrequest->fd, "write error in FIFO\n", TERM_NO); LOG_PRINT(LOG_WARNING, "write error in FIFO"); } @@ -304,9 +304,9 @@ n_log_level = atoi(log_level); sprintf(outbuffer, "set loglevel to %d submitted\n", n_log_level); - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); sprintf(outbuffer, "2loglevel %s", log_level); if (write(fd_fifo, outbuffer, strlen(outbuffer) + 1) == -1) { - iwrite(ptr_clrequest->fd, "write error in FIFO\n", 20); + tiwrite(ptr_clrequest->fd, "write error in FIFO\n", TERM_NO); LOG_PRINT(LOG_WARNING, "write error in FIFO"); } @@ -316,5 +316,5 @@ } else { - iwrite(ptr_clrequest->fd, "confserv: wrong or incomplete command\n", 38); + tiwrite(ptr_clrequest->fd, "confserv: wrong or incomplete command\n", TERM_NO); } } @@ -510,5 +510,5 @@ } - iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)); + tiwrite(ptr_clrequest->fd, outbuffer, TERM_NO); dbi_conn_close(conn); } @@ -552,5 +552,5 @@ if (!html_head || !html_foot) { iwrite(ptr_clrequest->fd, cgihead_plain.text, cgihead_plain.length); - iwrite(ptr_clrequest->fd, "could not load cgi templates\n", 29); + tiwrite(ptr_clrequest->fd, "could not load cgi templates\n", TERM_NO); free(html_head); free(html_foot); @@ -565,6 +565,6 @@ if (ptr_clrequest->n_cgi) { iwrite(ptr_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_clrequest->fd, html_head, strlen(html_head)); - iwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Current Database</th></tr></thead><tbody><tr><td class=\"result\">", 94); + tiwrite(ptr_clrequest->fd, html_head, TERM_NO); + tiwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Current Database</th></tr></thead><tbody><tr><td class=\"result\">", TERM_NO); free(html_head); } @@ -583,17 +583,17 @@ } else { - iwrite(ptr_clrequest->fd, "not a RefDB database\n", 21); + tiwrite(ptr_clrequest->fd, "not a RefDB database\n", TERM_NO); } } else { - iwrite(ptr_clrequest->fd, "not a RefDB database\n", 21); + tiwrite(ptr_clrequest->fd, "not a RefDB database\n", TERM_NO); } } else { - iwrite(ptr_clrequest->fd, "database does not exist\n", 24); + tiwrite(ptr_clrequest->fd, "database does not exist\n", TERM_NO); } if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "</td></tr>", 10); - iwrite(ptr_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_clrequest->fd, "</td></tr>", TERM_NO); + tiwrite(ptr_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -603,6 +603,6 @@ if (ptr_clrequest->n_cgi) { iwrite(ptr_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_clrequest->fd, html_head, strlen(html_head)); - iwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Available Databases</th></tr></thead><tbody><tr><td><input type=\"button\" value=\"Select database\" onclick=\"seldb()\"></td></tr>", 156); + tiwrite(ptr_clrequest->fd, html_head, TERM_NO); + tiwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Available Databases</th></tr></thead><tbody><tr><td><input type=\"button\" value=\"Select database\" onclick=\"seldb()\"></td></tr>", TERM_NO); free(html_head); } @@ -612,18 +612,18 @@ if (is_reference_database(ptr_clrequest, NULL, dbname)) { if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "<tr><td class=\"result\"><input type=\"radio\" name=\"selectdb\" value=\"", 66); + tiwrite(ptr_clrequest->fd, "<tr><td class=\"result\"><input type=\"radio\" name=\"selectdb\" value=\"", TERM_NO); } - iwrite(ptr_clrequest->fd, dbname, strlen(dbname)); + tiwrite(ptr_clrequest->fd, dbname, TERM_NO); if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "\">", 2); - iwrite(ptr_clrequest->fd, dbname, strlen(dbname)); - iwrite(ptr_clrequest->fd, "</td></tr>", 10); + tiwrite(ptr_clrequest->fd, "\">", TERM_NO); + tiwrite(ptr_clrequest->fd, dbname, TERM_NO); + tiwrite(ptr_clrequest->fd, "</td></tr>", TERM_NO); } - iwrite(ptr_clrequest->fd, "\n", sizeof(char)); + tiwrite(ptr_clrequest->fd, "\n", TERM_NO); } } } if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -751,6 +751,6 @@ username = dbi_result_get_string(dbires, "user_name"); if (username) { - iwrite(ptr_clrequest->fd, username, strlen(username)); - iwrite(ptr_clrequest->fd, "\n", sizeof(char)); + tiwrite(ptr_clrequest->fd, username, TERM_NO); + tiwrite(ptr_clrequest->fd, "\n", TERM_NO); } } @@ -815,6 +815,6 @@ wordname = dbi_result_get_string(dbires, "name"); if (wordname) { - iwrite(ptr_clrequest->fd, wordname, strlen(wordname)); - iwrite(ptr_clrequest->fd, "\n", sizeof(char)); + tiwrite(ptr_clrequest->fd, wordname, TERM_NO); + tiwrite(ptr_clrequest->fd, "\n", TERM_NO); } } @@ -892,5 +892,5 @@ if (dbires == NULL) { - iwrite(ptr_clrequest->fd, "createdb failed\n", 16); + tiwrite(ptr_clrequest->fd, "createdb failed\n", TERM_NO); free(sql_command); dbi_conn_close(conn); @@ -906,5 +906,5 @@ error = dbi_conn_select_db(conn, dbname); if (error) { - iwrite(ptr_clrequest->fd, "selectdb failed\n", 16); + tiwrite(ptr_clrequest->fd, "selectdb failed\n", TERM_NO); dbi_conn_close(conn); free(sql_command); @@ -961,5 +961,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "insert into t_meta failed\n", 26); + tiwrite(ptr_clrequest->fd, "insert into t_meta failed\n", TERM_NO); LOG_PRINT(LOG_ERR, "insert into t_meta failed"); free(sql_command); @@ -1026,5 +1026,5 @@ if (unlink(sql_command)) { - iwrite(ptr_clrequest->fd, "failed to delete database file\n", 31); + tiwrite(ptr_clrequest->fd, "failed to delete database file\n", TERM_NO); free(sql_command); return 0; @@ -1044,5 +1044,5 @@ dbires = dbi_conn_query(conn, sql_command); if (!dbires) { - iwrite(ptr_clrequest->fd, "deletedb failed\n", 16); + tiwrite(ptr_clrequest->fd, "deletedb failed\n", TERM_NO); dbi_conn_close(conn); free(sql_command); @@ -1064,5 +1064,5 @@ dbires = dbi_conn_query(conn, sql_command); if (error) { - iwrite(ptr_clrequest->fd, "DROP GROUP failed\n", 18); + tiwrite(ptr_clrequest->fd, "DROP GROUP failed\n", TERM_NO); dbi_conn_close(conn); free(sql_command); @@ -1145,5 +1145,5 @@ /* send back confirmation to the client */ - numbyte = iwrite(ptr_clrequest->fd, positive.text, positive.length+1); + numbyte = tiwrite(ptr_clrequest->fd, positive.text, TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1211,5 +1211,5 @@ /* use localhost if no host was specified */ if (!*user_host) { - iwrite(ptr_clrequest->fd, "use localhost as host\n", 22); + tiwrite(ptr_clrequest->fd, "use localhost as host\n", TERM_NO); user_host = localhost; } @@ -1451,5 +1451,5 @@ } else { /* driver does not support SQL-based access control */ - iwrite(ptr_clrequest->fd, "access control not supported", 29); + tiwrite(ptr_clrequest->fd, "access control not supported", TERM_NO); LOG_PRINT(LOG_WARNING, "access control not supported"); } @@ -1467,5 +1467,5 @@ sprintf(sql_command, "%d user entries added, %d failed\n", num_users, failed); } - iwrite(ptr_clrequest->fd, sql_command, strlen(sql_command)); + tiwrite(ptr_clrequest->fd, sql_command, TERM_NO); delete_all_lilimem(&sentinel); return 1; @@ -1523,5 +1523,5 @@ /* send back confirmation to the client */ - numbyte = iwrite(ptr_clrequest->fd, positive.text, positive.length+1); + numbyte = tiwrite(ptr_clrequest->fd, positive.text, TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -1614,5 +1614,5 @@ sprintf(sql_command, "%d word entries added, %d failed\n", num_words, failed); } - iwrite(ptr_clrequest->fd, sql_command, strlen(sql_command)); + tiwrite(ptr_clrequest->fd, sql_command, TERM_NO); delete_all_lilimem(&sentinel); return 1; @@ -1725,5 +1725,5 @@ iwrite(ptr_clrequest->fd, cgihead_plain.text, cgihead_plain.length); } - iwrite(ptr_clrequest->fd, "getfoo failed\n", 14); + tiwrite(ptr_clrequest->fd, "getfoo failed\n", TERM_NO); dbi_conn_close(conn); free(sql_command); @@ -1739,5 +1739,5 @@ if (!html_head || !html_foot) { iwrite(ptr_clrequest->fd, cgihead_plain.text, cgihead_plain.length); - iwrite(ptr_clrequest->fd, "could not load cgi templates\n", 29); + tiwrite(ptr_clrequest->fd, "could not load cgi templates\n", TERM_NO); free(html_head); free(html_foot); @@ -1747,8 +1747,9 @@ } iwrite(ptr_clrequest->fd, cgihead_html.text, cgihead_html.length); - iwrite(ptr_clrequest->fd, html_head, strlen(html_head)); + tiwrite(ptr_clrequest->fd, html_head, TERM_NO); + switch (type) { case 1: - iwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Matching keywords</th></tr></thead><tbody>", 72); + tiwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Matching keywords</th></tr></thead><tbody>", TERM_NO); break; case 2: /* fall through for all journal types */ @@ -1756,5 +1757,5 @@ case 4: case 5: - iwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Matching journals</th></tr></thead><tbody>", 72); + tiwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Matching journals</th></tr></thead><tbody>", TERM_NO); break; case 6: /* fall through for all author/editor types */ @@ -1762,5 +1763,5 @@ case 0: default: /* author is default */ - iwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Matching authors</th></tr></thead><tbody>", 71); + tiwrite(ptr_clrequest->fd, "<thead><tr><th class=\"result\">Matching authors</th></tr></thead><tbody>", TERM_NO); break; } @@ -1775,9 +1776,9 @@ if (foostring) { if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "<tr><td class=\"result\">", 23); + tiwrite(ptr_clrequest->fd, "<tr><td class=\"result\">", TERM_NO); } iwrite(ptr_clrequest->fd, foostring, strlen(foostring)); if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "</td></tr>", 10); + tiwrite(ptr_clrequest->fd, "</td></tr>", TERM_NO); } } @@ -1789,36 +1790,36 @@ if (foostring) { if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "<tr><td class=\"result\">", 23); + tiwrite(ptr_clrequest->fd, "<tr><td class=\"result\">", TERM_NO); } - iwrite(ptr_clrequest->fd, foostring, strlen(foostring)); + tiwrite(ptr_clrequest->fd, foostring, TERM_NO); } - iwrite(ptr_clrequest->fd, ":", 1); + tiwrite(ptr_clrequest->fd, ":", TERM_NO); foostring = dbi_result_get_string_idx(dbires, 2); /* 1-base index */ if (foostring) { - iwrite(ptr_clrequest->fd, foostring, strlen(foostring)); + tiwrite(ptr_clrequest->fd, foostring, TERM_NO); } - iwrite(ptr_clrequest->fd, ":", 1); + tiwrite(ptr_clrequest->fd, ":", TERM_NO); foostring = dbi_result_get_string_idx(dbires, 3); /* 1-base index */ if (foostring) { - iwrite(ptr_clrequest->fd, foostring, strlen(foostring)); + tiwrite(ptr_clrequest->fd, foostring, TERM_NO); } - iwrite(ptr_clrequest->fd, ":", 1); + tiwrite(ptr_clrequest->fd, ":", TERM_NO); foostring = dbi_result_get_string_idx(dbires, 4); /* 1-base index */ if (foostring) { - iwrite(ptr_clrequest->fd, foostring, strlen(foostring)); + tiwrite(ptr_clrequest->fd, foostring, TERM_NO); } - iwrite(ptr_clrequest->fd, "|", 1); + tiwrite(ptr_clrequest->fd, "|", TERM_NO); if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, "</td></tr>", 10); + tiwrite(ptr_clrequest->fd, "</td></tr>", TERM_NO); } } - iwrite(ptr_clrequest->fd, "\n", sizeof(char)); + tiwrite(ptr_clrequest->fd, "\n", TERM_NO); } if (ptr_clrequest->n_cgi) { - iwrite(ptr_clrequest->fd, html_foot, strlen(html_foot)); + tiwrite(ptr_clrequest->fd, html_foot, TERM_NO); free(html_foot); } @@ -1873,5 +1874,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "access denied\n", 14); + tiwrite(ptr_clrequest->fd, "access denied\n", TERM_NO); sprintf(outbuffer, "unauthorized administration attempt by %s detected", ptr_clrequest->username); LOG_PRINT(LOG_WARNING, outbuffer); Index: refdbdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -U2 -r1.32 -r1.33 --- refdbdbib.c 22 Jan 2004 01:11:55 -0000 1.32 +++ refdbdbib.c 29 Jan 2004 01:42:33 -0000 1.33 @@ -268,5 +268,5 @@ if (conv_descriptor == (iconv_t)(-1)) { LOG_PRINT(LOG_WARNING, "cannot set conversion descriptor"); - iwrite(ptr_clrequest->fd, "cannot set conversion descriptor\n", 33); + tiwrite(ptr_clrequest->fd, "cannot set conversion descriptor\n", TERM_NO); delete_all_lilimem(&sentinel); close_dbi_connections(&bibconns, drivername); @@ -309,5 +309,5 @@ if (n_send_stylespec) { /* send back confirmation to the client */ - numbyte = iwrite(ptr_clrequest->fd, "SPEC", 5); + numbyte = tiwrite(ptr_clrequest->fd, "SPEC", TERM_YES); if (numbyte == -1) { delete_all_lilimem(&sentinel); @@ -321,5 +321,5 @@ if (!send_stylespec(ptr_clrequest->fd, bibconns.conn_refdb, myjournal, n_ref_format)) { - iwrite(ptr_clrequest->fd, "", 1); /* terminate whatever was sent */ + tiwrite(ptr_clrequest->fd, "", TERM_YES); /* terminate whatever was sent */ /* read the client reply */ @@ -334,5 +334,5 @@ return 0; } - iwrite(ptr_clrequest->fd, "style spec error", 16); + tiwrite(ptr_clrequest->fd, "style spec error", TERM_NO); close_dbi_connections(&bibconns, drivername); delete_all_lilimem(&sentinel); @@ -427,5 +427,5 @@ } else { - iwrite(ptr_clrequest->fd, "driver not supported\n", 21); + tiwrite(ptr_clrequest->fd, "driver not supported\n", TERM_NO); LOG_PRINT(LOG_ERR, "driver not supported"); close_dbi_connections(&bibconns, drivername); @@ -444,9 +444,9 @@ dbi_conn_error(bibconns.conn, &sql_errmsg); if (sql_errmsg) { - iwrite(ptr_clrequest->fd, sql_errmsg, strlen(sql_errmsg)); + tiwrite(ptr_clrequest->fd, sql_errmsg, TERM_NO); LOG_PRINT(LOG_WARNING, (char*)sql_errmsg); } else { - iwrite(ptr_clrequest->fd, "create table error", 18); + tiwrite(ptr_clrequest->fd, "create table error", TERM_NO); LOG_PRINT(LOG_WARNING, "create table error"); } @@ -478,5 +478,5 @@ /* tell client that we're ready for XML data */ - numbyte = iwrite(ptr_clrequest->fd, positive.text, positive.length+1); + numbyte = tiwrite(ptr_clrequest->fd, positive.text, TERM_YES); if (numbyte == -1) { LOG_PRINT(LOG_WARNING, "could not write to client"); @@ -492,6 +492,6 @@ dbi_conn_error(bibconns.conn, &sql_errmsg); LOG_PRINT(LOG_WARNING, (char*)sql_errmsg); - iwrite(ptr_clrequest->fd, "xml processing error:", 21); - iwrite(ptr_clrequest->fd, sql_errmsg, strlen(sql_errmsg)); + tiwrite(ptr_clrequest->fd, "xml processing error:", TERM_NO); + tiwrite(ptr_clrequest->fd, sql_errmsg, TERM_NO); sprintf(sql_command, "DROP TABLE %s", table_name); LOG_PRINT(LOG_DEBUG, sql_command); @@ -510,5 +510,5 @@ } else if (nmem_error) { - iwrite(ptr_clrequest->fd, "out of memory while reading xml file\n", 37); + tiwrite(ptr_clrequest->fd, "out of memory while reading xml file\n", TERM_NO); LOG_PRINT(LOG_WARNING, "out of memory while reading xml file"); delete_all_lilimem(&sentinel); @@ -522,7 +522,7 @@ dbi_conn_error(bibconns.conn, &sql_errmsg); LOG_PRINT(LOG_WARNING, (char*)sql_errmsg); - iwrite(ptr_clrequest->fd, "database error while reading xml file: ", 38); - iwrite(ptr_clrequest->fd, sql_errmsg, strlen(sql_errmsg)); - iwrite(ptr_clrequest->fd, "\n", 1); + tiwrite(ptr_clrequest->fd, "database error while reading xml file: ", TERM_NO); + tiwrite(ptr_clrequest->fd, sql_errmsg, TERM_NO); + tiwrite(ptr_clrequest->fd, "\n", TERM_NO); delete_all_lilimem(&sentinel); close_dbi_connections(&bibconns, drivername); @@ -534,5 +534,5 @@ /* tell client that data are ready */ - numbyte = iwrite(ptr_clrequest->fd, positive.text, positive.length+1); + numbyte = tiwrite(ptr_clrequest->fd, positive.text, TERM_YES); if (numbyte == -1) { LOG_PRINT(LOG_WARNING, "could not write to client"); @@ -576,5 +576,5 @@ if (!dbires) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, "obtaining format information failed: ", bibconns.conn_refdb)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -585,5 +585,5 @@ if (dbi_result_next_row(dbires) == 0) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, "could not access format information: ", bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -601,5 +601,5 @@ if (!bibsequence || !strcmp(bibsequence, "ERROR")) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, "could not access format information: ", bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -636,5 +636,5 @@ dbires = dbi_conn_query(bibconns.conn, sql_command); if (!dbires) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, notempselectcolon.text, bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -656,5 +656,5 @@ if (!dbires_cit) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, "CITSTYLE select failed: ", bibconns.conn_refdb)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -666,5 +666,5 @@ if (dbi_result_next_row(dbires_cit) == 0) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, "CITSTYLE select failed: ", bibconns.conn_refdb)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -691,5 +691,5 @@ if (!dbires_intext) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, "INTEXT select failed: ", bibconns.conn_refdb)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -727,5 +727,5 @@ dbires = dbi_conn_query(bibconns.conn, sql_command); if (!dbires) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, notempselectcolon.text, bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -744,5 +744,5 @@ id_string = my_dbi_result_get_string_copy(dbires, "entry_id"); if (!id_string || !strcmp(id_string, "ERROR") || insert_lilimem(&sentinel, (void**)&id_string, "id_string")) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, notempselectcolon.text, bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -757,5 +757,5 @@ if (!dbires1) { nfailed++; - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, noformatupdatecolon.text, bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -823,5 +823,5 @@ if (!dbires1) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); nfailed++; if (!assemble_return_msg(ptr_addresult, notempselectcolon.text, bibconns.conn_source)) { @@ -834,5 +834,5 @@ if (dbi_result_next_row(dbires1) == 0) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); nfailed++; if (!assemble_return_msg(ptr_addresult, "could not retrieve query results: ", bibconns.conn)) { @@ -847,5 +847,5 @@ ptr_biblio_info->entry_id = my_dbi_result_get_string_copy(dbires, "entry_id"); if (!ptr_biblio_info->entry_id || !strcmp(ptr_biblio_info->entry_id, "ERROR") || insert_lilimem(&sentinel, (void**)&(ptr_biblio_info->entry_id), "id_string")) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, notempselectcolon.text, bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -863,5 +863,5 @@ item = my_dbi_result_get_string_copy(dbires, "author_concat"); if ((!item && dbi_conn_error_flag(bibconns.conn)) || (item && !strcmp(item, "ERROR"))) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); if (!assemble_return_msg(ptr_addresult, notempselectcolon.text, bibconns.conn)) { LOG_PRINT(LOG_WARNING, ptr_addresult->msg); @@ -894,5 +894,5 @@ if ((new_outbuffer = render_dbib(&outbuffer, &outbuffer_len, &bibconns, dbires1 /* reference info */, item /* database */, ptr_biblio_info, ptr_clrequest->username, "", nref_counter)) == NULL) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); nfailed++; ptr_addresult->msg = strdup("could not format data: "); @@ -939,13 +939,13 @@ if (iconv(conv_descriptor, &my_instring, &inlength, &my_outbuffer, &outlength) == (size_t)(-1)) { if (errno == EILSEQ) { - iwrite(ptr_clrequest->fd, "iconv: invalid input character sequence\n", 40); + tiwrite(ptr_clrequest->fd, "iconv: invalid input character sequence\n", TERM_YES); LOG_PRINT(LOG_WARNING, "iconv: invalid input character sequence"); } else if (errno == E2BIG) { - iwrite(ptr_clrequest->fd, "iconv: output buffer too small\n", 31); + tiwrite(ptr_clrequest->fd, "iconv: output buffer too small\n", TERM_YES); LOG_PRINT(LOG_WARNING, "iconv: output buffer too small"); } else if (errno == EINVAL) { - iwrite(ptr_clrequest->fd, "iconv: incomplete input character\n", 34); + tiwrite(ptr_clrequest->fd, "iconv: incomplete input character\n", TERM_YES); LOG_PRINT(LOG_WARNING, "iconv: incomplete input character"); } @@ -979,5 +979,5 @@ if ((new_outbuffer = finish_render_dbib(&outbuffer, &outbuffer_len, &bibconns, ptr_biblio_info, table_name, ptr_clrequest)) == NULL) { - iwrite(ptr_clrequest->fd, "", 1); + tiwrite(ptr_clrequest->fd, "", TERM_YES); nfailed++; ptr_addresult->msg = strdup("could not create footer: "); @@ -993,5 +993,5 @@ } - n_writeresult = iwrite(ptr_clrequest->fd, outbuffer, strlen(outbuffer)+1); + n_writeresult = tiwrite(ptr_clrequest->fd, outbuffer, TERM_YES); /* printf("n_writeresult=%d<<\n", n... [truncated message content] |