]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
wme_test: Use send_async() which is implemented by FWP
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 12 Aug 2009 16:26:54 +0000 (18:26 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 12 Aug 2009 16:26:54 +0000 (18:26 +0200)
wme_test/wclient.c

index 9bcc8e8e77296b87fb6cef95db55aa89b97096eb..592e5f545d8752363d1802237f07f333f33dccdd 100644 (file)
@@ -530,7 +530,12 @@ send_packet_fwp(struct stream* stream, union msg_buff* buff)
        int ret = 0;
 
        buff->msg.resp_port = htons(stream->resp_port);
-       ret = frsh_send_sync(stream->endpoint, buff, stream->packet_size);
+       ret = frsh_send_async(stream->endpoint, buff, stream->packet_size);
+       if (ret) {
+               char msg[1024];
+               frsh_strerror(ret, msg, sizeof(msg));
+               fprintf(stderr, "frsh_send error: %s\n", msg);
+       }
        return (ret == 0) ? 0 : -1;
 }
 #endif
@@ -590,6 +595,7 @@ void* sender(void* arg)
 
                ret = send_packet(stream, &buff);
                if (ret < 0) {
+                       stopper();
                        goto out;
                }