Thread: [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_chil... [truncated message content] |