2
2
Routines to handle work requests.
4
Copyright (C) 1991, 1992, 1993, 1995 Ian Lance Taylor
4
Copyright (C) 1991, 1992, 1993, 1995, 2002 Ian Lance Taylor
6
6
This file is part of the Taylor UUCP package.
18
18
You should have received a copy of the GNU General Public License
19
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22
The author of the program may be contacted at ian@airs.com or
23
c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
22
The author of the program may be contacted at ian@airs.com.
29
const char xcmd_rcsid[] = "$Id: xcmd.c,v 1.19 1995/06/21 20:20:42 ian Rel $";
28
const char xcmd_rcsid[] = "$Id: xcmd.c,v 1.24 2002/03/05 19:10:42 ian Rel $";
77
79
ulog (LOG_NORMAL, "Requesting work: %s to %s", qtrans->s.zfrom,
81
82
qtrans->fcmd = TRUE;
82
83
qtrans->precfn = flocal_xcmd_await_reply;
85
fquote = fcmd_needs_quotes (&qtrans->s);
90
if ((qdaemon->ifeatures & FEATURE_QUOTES) == 0)
93
"%s: remote system does not support required quoting",
95
(void) fmail_transfer (FALSE, qtrans->s.zuser, (const char *) NULL,
96
"remote system does not support required quoting",
97
qtrans->s.zfrom, qdaemon->qsys->uuconf_zname,
98
qtrans->s.zto, (const char *) NULL,
100
(void) fsysdep_did_work (qtrans->s.pseq);
105
uquote_cmd (&qtrans->s, &squoted);
84
109
if (! fqueue_receive (qdaemon, qtrans))
87
112
/* We send the string
88
113
X from to user options
89
114
We put a dash in front of options. */
90
clen = (strlen (qtrans->s.zfrom) + strlen (qtrans->s.zto)
91
+ strlen (qtrans->s.zuser) + strlen (qtrans->s.zoptions) + 7);
115
clen = (strlen (qcmd->zfrom) + strlen (qcmd->zto)
116
+ strlen (qcmd->zuser) + strlen (qcmd->zoptions) + 7);
92
117
zsend = zbufalc (clen);
93
sprintf (zsend, "X %s %s %s -%s", qtrans->s.zfrom, qtrans->s.zto,
94
qtrans->s.zuser, qtrans->s.zoptions);
118
sprintf (zsend, "X %s %s %s -%s", qcmd->zfrom, qcmd->zto,
119
qcmd->zuser, qcmd->zoptions);
96
121
fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, zsend, qtrans->ilocal,
126
ufree_quoted_cmd (&squoted);
100
128
/* If fret is FALSE, we should free qtrans here, but see the comment
101
129
at the end of flocal_rec_send_request. */