On Thu, Apr 07, 2005 at 12:25:21PM +0200, Andreas Mueller wrote:
> hi @all,
>
> I just started to get familiar with ccrtp and therfor I tried to send a
> file from a sender to a receiver. I tried it this way:
>
> int i=0;
> char buffer;
> ifstream examplefile ("test.jpg");
> while (! examplefile.eof() )
> {
> buffer=examplefile.get ();
> putData(timestamp+ i*tstampInc,(unsigned
> char*)buffer,strlen((char *)buffer));
> Thread::sleep(TimerPort::getTimer());
> TimerPort::incTimer(period);
> ++i;
> }
>
> but i always get a Segmentation fault. I guess the third argument of
> putData is the problem but I have no idea how to solve it.
>
> can anybody help me?
Yes, it seems a problem with pointers, try using &buffer instead of
buffer or declaring buffer as a pointer.
_______________________________________________
Ccrtp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccrtp-devel