[Redbutton-devel] SF.net SVN: redbutton: [187] redbutton-browser/trunk/MHEGEngine.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-01-22 16:47:28
|
Revision: 187
http://svn.sourceforge.net/redbutton/?rev=187&view=rev
Author: skilvington
Date: 2007-01-22 08:47:23 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
use timeout value when searching for initial boot object
Modified Paths:
--------------
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-01-22 15:23:21 UTC (rev 186)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-01-22 16:47:23 UTC (rev 187)
@@ -192,19 +192,27 @@
bool block;
unsigned int i;
bool found;
+ struct timeval start;
+ struct timeval now;
/* search order for the app to boot in the Service Gateway dir */
char *boot_order[] = { "~//a", "~//startup", NULL };
do
{
- /* search for the boot object */
+ /* search for the boot object for timeout seconds */
found = false;
- for(i=0; !found && boot_order[i] != NULL; i++)
+ gettimeofday(&start, NULL);
+ do
{
- boot_obj.size = strlen(boot_order[i]);
- boot_obj.data = boot_order[i];
- found = MHEGEngine_checkContentRef(&boot_obj);
+ for(i=0; !found && boot_order[i] != NULL; i++)
+ {
+ boot_obj.size = strlen(boot_order[i]);
+ boot_obj.data = boot_order[i];
+ found = MHEGEngine_checkContentRef(&boot_obj);
+ }
+ gettimeofday(&now, NULL);
}
+ while(!found && now.tv_sec <= (start.tv_sec + engine.timeout));
if(!found)
{
error("Unable to find boot object in service gateway");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|