Skip to content

Commit

Permalink
Don't try to write xferfaxlog with empty result
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Lindenberg committed May 20, 2014
1 parent cf8f680 commit 867b666
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/gofaxsend/sendqfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,17 @@ func SendQfile(qfilename string) (int, error) {
}
}

xfl := gofaxlib.NewXFRecord(result)
xfl.Modem = *device_id
xfl.Jobid = uint(jobid)
xfl.Jobtag = qf.GetFirst("jobtag")
xfl.Sender = qf.GetFirst("mailaddr")
xfl.Destnum = faxjob.Number
xfl.Owner = qf.GetFirst("owner")
if err = xfl.SaveTransmissionReport(); err != nil {
sessionlog.Log(err)
if result != nil {
xfl := gofaxlib.NewXFRecord(result)
xfl.Modem = *device_id
xfl.Jobid = uint(jobid)
xfl.Jobtag = qf.GetFirst("jobtag")
xfl.Sender = qf.GetFirst("mailaddr")
xfl.Destnum = faxjob.Number
xfl.Owner = qf.GetFirst("owner")
if err = xfl.SaveTransmissionReport(); err != nil {
sessionlog.Log(err)
}
}

return returned, faxerr
Expand Down

0 comments on commit 867b666

Please sign in to comment.