Fix can_socket again.
authoretisserant
Fri, 11 May 2007 18:34:26 +0200
changeset 189 1c1d1893f1c9
parent 188 00245bc2e6fe
child 190 3248a2d6bb0b
Fix can_socket again.
drivers/can_socket/can_socket.c
--- a/drivers/can_socket/can_socket.c	Fri May 11 15:24:43 2007 +0200
+++ b/drivers/can_socket/can_socket.c	Fri May 11 18:34:26 2007 +0200
@@ -108,7 +108,7 @@
        int err;
        CAN_HANDLE fd0 = malloc(sizeof(int));
 
-       *(int*)fd0 = CAN_SOCKET(PF_CAN, SOCK_RAW, 0);
+       *(int*)fd0 = CAN_SOCKET(PF_CAN, SOCK_RAW, CAN_RAW);
        if(*(int*)fd0 < 0){
                fprintf(stderr,"Socket creation failed.\n");
                goto error_ret;
@@ -133,7 +133,7 @@
        return fd0;
 
  error_close:
-       CAN_CLOSE(fd0);
+       CAN_CLOSE(*(int*)fd0);
 
  error_ret:
        free(fd0);