- while (r < sizeof(struct suid_packet_header)) {
- int t = GNUNET_DISK_file_read(mycls->fh_from_helper, &hdr, sizeof(struct suid_packet_header));
- if (t< 0) {
- fprintf(stderr, "Read error for header: %m\n");
- return;
- }
- r += t;
+ int t = GNUNET_DISK_file_read(mycls->fh_from_helper, &buf, 65535);
+ if (t<=0) {
+ fprintf(stderr, "Read error for header: %m\n");
+ GNUNET_SCHEDULER_add_now(mycls->sched, restart_helper, cls);
+ return;