*** empty log message ***
This commit is contained in:
parent
25d8d878c7
commit
c2c0ce7fe3
|
@ -350,7 +350,7 @@ static MmsEnvelope *pgq_queue_readenvelope_ex(char *qf, char *mms_queuedir, int
|
||||||
int64_t qid;
|
int64_t qid;
|
||||||
long num_attempts, i, n;
|
long num_attempts, i, n;
|
||||||
time_t sendt, created, lastt, edate;
|
time_t sendt, created, lastt, edate;
|
||||||
char cmd[4*QFNAMEMAX], _qf[QFNAMEMAX*2+1], tmp[128];
|
char cmd[4*QFNAMEMAX], _qf[QFNAMEMAX*2+1];
|
||||||
char data_file[4*QFNAMEMAX+1];
|
char data_file[4*QFNAMEMAX+1];
|
||||||
Octstr *from = NULL;
|
Octstr *from = NULL;
|
||||||
|
|
||||||
|
@ -366,13 +366,13 @@ static MmsEnvelope *pgq_queue_readenvelope_ex(char *qf, char *mms_queuedir, int
|
||||||
n = strlen(qf);
|
n = strlen(qf);
|
||||||
PQescapeStringConn(c, _qf, qf, n < QFNAMEMAX ? n : QFNAMEMAX, NULL);
|
PQescapeStringConn(c, _qf, qf, n < QFNAMEMAX ? n : QFNAMEMAX, NULL);
|
||||||
|
|
||||||
strncpy(tmp, (check_send_time) ? " AND send_time <= current_timestamp " : "", sizeof tmp); /* handle checking of due time */
|
|
||||||
|
|
||||||
/* read and block, to ensure no one else touches it. */
|
/* read and block, to ensure no one else touches it. */
|
||||||
sprintf(cmd, "SELECT id,cdate,lastt,sendt,edate,num_attempts,sender,data FROM "
|
sprintf(cmd, "SELECT id,cdate,lastt,sendt,edate,num_attempts,sender,data FROM "
|
||||||
" mms_messages_view WHERE qdir='%s' AND qfname = '%s' %s FOR UPDATE %s",
|
" mms_messages_view WHERE qdir='%s' AND qfname = '%s' %s FOR UPDATE %s",
|
||||||
mms_queuedir, _qf,
|
mms_queuedir, _qf,
|
||||||
tmp,
|
check_send_time ? " AND send_time <= current_timestamp " : "",
|
||||||
shouldblock ? "" : "NOWAIT"); /* nice little PostgreSQL 8.x addition. */
|
shouldblock ? "" : "NOWAIT"); /* nice little PostgreSQL 8.x addition. */
|
||||||
r = PQexec(c, cmd);
|
r = PQexec(c, cmd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue