• Advertisement
Sign in to follow this  

HELP! program crases then trying to send data ( cent OS )

This topic is 3765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://rafb.net/p/gKP2fs60.html << code It is my m-jpeg stream server. It crashes in 210 line, then client closes connection. Crashes without any message. I don't know why. Any IDEAS???

Share this post


Link to post
Share on other sites
Advertisement
How do you know it crashes on that line? Why aren't you checking that sc isn't null? And why are you passing void pointers as parameters? :/

Share this post


Link to post
Share on other sites
How do you know it crashes on that line?

code:
cout<<"wb "<<buflen<<"\n";
n = send(sc->sock, buff , buflen, 0);
cout<<"we "<<n<<"\n";


program output:
we 11804
wb 11742
we 11742
wb 11759
we 11759
wb 11750
we 11750
wb 11734
-bash-3.00$

I know it from that output.

Why aren't you checking that sc isn't null?
I'll do it!.

And why are you passing void pointers as parameters?
It's needed for POSIX thread library.

Share this post


Link to post
Share on other sites
http://rafb.net/p/ddP02J98.html new paste.
hplus0603 I'm trying to solve this problem for about a week.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement