Re: write callback issues (was Re: A new problem)
Date: Fri, 4 Apr 2008 10:32:09 +0530 (IST)
On Thu, 3 Apr 2008, Linus Nielsen Feltzing wrote:
> This code looks very suspicious. Firstly, you overwrite the usrp pointer for
> every call, which will lead to a memory leak, since you don't delete the
> existing one first.
> Secondly, what purpose does the sprintf() fill? As you use it, it could be
> replaced with a simple memcpy(), since you seem to expect printable data
> Thirdly, with this approach, you will never see the entire result, since you
> are constantly overwriting the data from the previous callback.
> All in all, this code will not work very well.
Oh..how very enlightening! But apparently the function is working well
Anyways...thanks for the information.
-- Regards - PrasadReceived on 2008-04-04