From b3ee41ad595b07927a81ee274abfbaa85c8180f6 Mon Sep 17 00:00:00 2001
From: Steve Murphy <murf@digium.com>
Date: Tue, 23 Sep 2008 14:26:32 +0000
Subject: [PATCH] Blocked revisions 143964 via svnmerge

........
r143964 | murf | 2008-09-23 08:22:10 -0600 (Tue, 23 Sep 2008) | 21 lines

In at least one machine, we noted that the timestr
was not getting set in the STMT; it was coming out,
usually, as binary garbage to an mssql server.
These changes fixed the problem. The only thing
I can venture forth as a guess, is that the pointer
is being stored in the interface, not a copy of the
string. Because we ripped the build process into a
subroutine, the timestr became a temp. stack variable,
and between the time the STMT got built and the
time it was executed on the server, the string being
pointed to was damaged. At any rate, even if this
theory is false, and some mechanism was at fault,
this fix worked reliably where it didn't before.

Why this bug didn't bite last week, I have no idea.
This change basically defines the timestr buffer
in the calling function, extending the life of the
buffer to cover both the STMT's building and
processing to the server.

I AM BLOCKING THIS FIX FROM TRUNK, because we
tested out a trunk release, and it is working
fine.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-- 
GitLab