]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/fwp/tests/fwp_prototest/fwp_sendrecv_test2.c
Convert debug messages to uLUt and fix #include dependencies
[frescor/fwp.git] / fwp / lib / fwp / tests / fwp_prototest / fwp_sendrecv_test2.c
index 9f377dbe52fa113ba435e14011346d18c2d914fc..6af7623720c2a63009d8d98fb52158cf9e5caba1 100644 (file)
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <pthread.h>
+#include <arpa/inet.h>
 
 #define MSGN 2
 
@@ -29,13 +30,13 @@ void* receiver(void* arg)
        char buffer[30];
        fwp_addr_t from;
        
-       FWP_DEBUG("Creating receive endpoint\n");
+       printf("Creating receive endpoint\n");
        if (fwp_receive_endpoint_create(7777, &attr,&repoint_d1) < 0){
                perror("Error while creating receive endpoint\n");
                return NULL;
        }
                
-       FWP_DEBUG("Receive endpoint created \n");
+       printf("Receive endpoint created \n");
        for (i = 0; i < MSGN; i++) {
                if ((len = fwp_recv(repoint_d1, buffer, sizeof(buffer), &from,
                         0)) < 0) {
@@ -97,9 +98,9 @@ int main()
        fwp_send_endpoint_bind(sepoint_d1, vres_d1);
        
        fwp_send(sepoint_d1, msg1, sizeof(msg1), 0);
-       FWP_DEBUG("Sent msg1\n");
+       printf("Sent msg1\n");
        fwp_send(sepoint_d1, msg2, sizeof(msg2), 0);
-       FWP_DEBUG("Sent msg2\n");
+       printf("Sent msg2\n");
        
        pthread_join(thread, (void**) NULL);    
        /*if (fwp_vres_destroy(vres_d1) < 0) {