Skip to content

Commit

Permalink
error - unlock semaphore before freeing it
Browse files Browse the repository at this point in the history
  • Loading branch information
libm3l committed Dec 1, 2014
1 parent fc1f41b commit d855ae0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Source/Server_Body.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,17 +503,18 @@ lmint_t Server_Body(node_t *Gnode, lmint_t portno, opts_t* Popts_SB){
/*
* shutdown Server
*/
Pthread_mutex_unlock(&Data_Threads->lock);
activser = 0;
/*
* confirm to client
*/
opts.opt_EOBseq = '\0'; // send EOFbuff sequence only
if( m3l_send_to_tcpipsocket(Answers->RR_POS, (const char *)NULL, newsockfd, Popts) < 1)
Error("Server_Body: Error during sending data to socket");
if( m3l_Umount(&RecNode) != 1)
Perror("m3l_Umount");
if( close(newsockfd) == -1)
Perror("close");
opts.opt_EOBseq = '\0'; // send EOFbuff sequence only
if( m3l_send_to_tcpipsocket(Answers->RR_POS, (const char *)NULL, newsockfd, Popts) < 1)
Error("Server_Body: Error during sending data to socket");
if( m3l_Umount(&RecNode) != 1)
Perror("m3l_Umount");
if( close(newsockfd) == -1)
Perror("close");
break;

case 501:
Expand Down

0 comments on commit d855ae0

Please sign in to comment.