]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Fixed handling of send when it would block.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Jan 2008 10:08:08 +0000 (11:08 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Jan 2008 10:08:08 +0000 (11:08 +0100)
wme_test/wclient.c

index a534a17eae7a7f7cbcfac3b119c0df67de9489cc..266ef30c790f56917f4868f5cd5429d864540cdf 100644 (file)
@@ -382,7 +382,9 @@ void* sender(void* arg)
                while (sendto(ac_sockfd[stream->ac], &buff, packet_size, 0,\
                                (struct sockaddr*)&rem_addr, sizeof(rem_addr)) < 0) {
                                if (errno == EINTR) continue;
-                               if (errno != EAGAIN) {
+                               if (errno == EAGAIN) {
+                                       break;
+                               } else {
                                        perror("Error while sending");
                                        goto out;
                                }