*** /usr/src/irda-utils-0.9.4/psion/psion5.c Wed Sep 8 00:03:33 1999 --- /usr/src/irda-utils-0.9.3-x/psion/psion5.c Tue May 18 23:51:20 1999 *************** *** 1,7 **** /********************************************************************* * * Filename: psion5.c ! * Version: 0.1 * Description: User space application for Psion 5 Palmtop Computers * Status: Experimental. * Author: Fons Botman --- 1,7 ---- /********************************************************************* * * Filename: psion5.c ! * Version: 0.2 * Description: User space application for Psion 5 Palmtop Computers * Status: Experimental. * Author: Fons Botman *************** *** 95,101 **** int irttp_get_mtu(int fd) { int mtu; int len = sizeof(int); ! /* Check what the IrTTP data size is */ if (getsockopt(fd, SOL_IRLMP, IRTTP_MAX_SDU_SIZE, (void *)&mtu, &len)) { return -1; --- 95,101 ---- int irttp_get_mtu(int fd) { int mtu; int len = sizeof(int); ! /* Check what the IrTTP Transmit data size is */ if (getsockopt(fd, SOL_IRLMP, IRTTP_MAX_SDU_SIZE, (void *)&mtu, &len)) { return -1; *************** *** 154,159 **** --- 154,160 ---- perror("irttp_get_mtu"); exit(1); } + assert(buflen == 2043); if (!(buf = malloc(buflen))) { perror("malloc"); exit(1); *************** *** 221,226 **** --- 222,228 ---- exit(1); } printf("%s\n", buf); + assert(rc == 5); cnt = 0; t0 = tx = t = time(NULL); *************** *** 315,326 **** --- 317,331 ---- int t0, tx, t; + #if 0 buflen = irttp_get_mtu(cfd); printf("mtu=%d\n", buflen); if (buflen < 2) { perror("irttp_get_mtu"); exit(1); } + #endif + buflen = 2048; if (!(buf = malloc(buflen))) { fprintf(stderr, "malloc buf failed\n"); exit(1);