| 117 | } |
| 118 | |
| 119 | static int test4_large_cookie_size() |
| 120 | { |
| 121 | int retcode; |
| 122 | char cookie[HAMLIB_COOKIE_SIZE * 2]; |
| 123 | |
| 124 | /* Using a larger cookie should also work */ |
| 125 | retcode = rig_cookie(NULL, RIG_COOKIE_GET, cookie, sizeof(cookie)); |
| 126 | |
| 127 | if (retcode == RIG_OK) { printf("Test#4a OK\n"); } |
| 128 | else {printf("Test#4a Failed\n"); return 1;} |
| 129 | |
| 130 | /* Cookie should be smaller the maximum specified by lib */ |
| 131 | //if (strlen(cookie) < HAMLIB_COOKIE_SIZE) { printf("Test#4b OK\n"); } |
| 132 | //else {printf("Test#4b Failed\n"); return 1;} |
| 133 | |
| 134 | /* Release the cookie again to clean up */ |
| 135 | retcode = rig_cookie(NULL, RIG_COOKIE_RELEASE, cookie, sizeof(cookie)); |
| 136 | |
| 137 | if (retcode == RIG_OK) { printf("Test#4c OK\n"); } |
| 138 | else {printf("Test#4c Failed\n"); return 1;} |
| 139 | |
| 140 | return 0; |
| 141 | } |
| 142 | |
| 143 | int main() |
| 144 | { |