[rtems-libbsd commit] ftpd: Fairplay
Sebastian Huber
sebh at rtems.org
Wed Apr 1 07:16:38 UTC 2015
Module: rtems-libbsd
Branch: master
Commit: 8e37837b21867eb3ae0a43b43bb7d0599f65adcb
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=8e37837b21867eb3ae0a43b43bb7d0599f65adcb
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Mar 27 15:05:44 2015 +0100
ftpd: Fairplay
---
rtemsbsd/ftpd/ftpd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rtemsbsd/ftpd/ftpd.c b/rtemsbsd/ftpd/ftpd.c
index 3a64f1d..3cfed57 100644
--- a/rtemsbsd/ftpd/ftpd.c
+++ b/rtemsbsd/ftpd/ftpd.c
@@ -199,6 +199,7 @@
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
+#include <sched.h>
#include <rtems.h>
#include <rtems/rtems_bsdnet.h>
@@ -818,6 +819,7 @@ command_retrieve(FTPD_SessionInfo_t *info, char const *filename)
{
if(send(s, buf, n, 0) != n)
break;
+ sched_yield();
}
}
else if (info->xfer_mode == TYPE_A)
@@ -853,6 +855,7 @@ command_retrieve(FTPD_SessionInfo_t *info, char const *filename)
}
}
while((rest -= i) > 0);
+ sched_yield();
}
}
@@ -1046,6 +1049,7 @@ command_store(FTPD_SessionInfo_t *info, char const *filename)
res = 0;
break;
}
+ sched_yield();
}
}
else if(info->xfer_mode == TYPE_A)
@@ -1107,6 +1111,7 @@ command_store(FTPD_SessionInfo_t *info, char const *filename)
res = 0;
}
while((rest -= i) > 0);
+ sched_yield();
}
}
More information about the vc
mailing list