Author: jgg
Date: 2001-03-23 01:47:14 GMT
More snprintf stuff
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-worker.cc,v 1.32 2001/02/20 07:03:17 jgg Exp $
+// $Id: acquire-worker.cc,v 1.33 2001/03/23 01:47:14 jgg Exp $
/* ######################################################################
Acquire Worker
/* ######################################################################
Acquire Worker
// Fork off the process
Process = ExecFork();
// Fork off the process
Process = ExecFork();
-
- // Spawn the subprocess
if (Process == 0)
{
// Setup the FDs
if (Process == 0)
{
// Setup the FDs
LookupTag(Message,"Drive")) == false)
{
char S[300];
LookupTag(Message,"Drive")) == false)
{
char S[300];
- sprintf(S,"603 Media Changed\nFailed: true\n\n");
+ snprintf(S,sizeof(S),"603 Media Changed\nFailed: true\n\n");
if (Debug == true)
clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl;
OutQueue += S;
if (Debug == true)
clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl;
OutQueue += S;
- sprintf(S,"603 Media Changed\n\n");
+ snprintf(S,sizeof(S),"603 Media Changed\n\n");
if (Debug == true)
clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl;
OutQueue += S;
if (Debug == true)
clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl;
OutQueue += S;