1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
36 /* The output semaphore. */ |
36 /* The output semaphore. */ |
37 sbs_semaphore talon_sem; |
37 sbs_semaphore talon_sem; |
38 |
38 |
39 #define TALON_ATTEMPT_STRMAX 32 |
39 #define TALON_ATTEMPT_STRMAX 32 |
40 #define RECIPETAG_STRMAX 2048 |
40 #define RECIPETAG_STRMAX 2048 |
41 #define STATUS_STRMAX 100 |
41 #define STATUS_STRMAX 120 |
42 |
42 |
43 #define TALONDELIMITER '|' |
43 #define TALONDELIMITER '|' |
44 #define VARNAMEMAX 100 |
44 #define VARNAMEMAX 100 |
45 #define VARVALMAX 1024 |
45 #define VARVALMAX 1024 |
46 |
46 |
547 |
547 |
548 talon_returncode = p->returncode; |
548 talon_returncode = p->returncode; |
549 |
549 |
550 if (dotagging) |
550 if (dotagging) |
551 { |
551 { |
552 char *forcesuccessstr = force_success == 0 ? "" : " forcesuccess='FORCESUCCESS'"; |
552 char *flagsstr = force_success == 0 ? "" : " flags='FORCESUCCESS'"; |
|
553 char *reasonstr = "" ; |
|
554 |
|
555 if (p->causeofdeath == PROC_TIMEOUTDEATH) |
|
556 reasonstr = " reason='timeout'"; |
553 |
557 |
554 if (p->returncode != 0) |
558 if (p->returncode != 0) |
555 { |
559 { |
556 char *exitstr = retries > 0 ? "retry" : "failed"; |
560 char *exitstr = retries > 0 ? "retry" : "failed"; |
557 snprintf(status, STATUS_STRMAX - 1, "\n<status exit='%s' code='%d' attempt='%d'%s />", exitstr, p->returncode, attempt, forcesuccessstr ); |
561 snprintf(status, STATUS_STRMAX - 1, "\n<status exit='%s' code='%d' attempt='%d'%s%s />", exitstr, p->returncode, attempt, flagsstr, reasonstr ); |
558 } else { |
562 } else { |
559 snprintf(status, STATUS_STRMAX - 1, "\n<status exit='ok' attempt='%d'%s />", attempt, forcesuccessstr ); |
563 snprintf(status, STATUS_STRMAX - 1, "\n<status exit='ok' attempt='%d'%s%s />", attempt, flagsstr, reasonstr ); |
560 } |
564 } |
561 status[STATUS_STRMAX-1] = '\0'; |
565 status[STATUS_STRMAX-1] = '\0'; |
562 |
566 |
563 snprintf(timestat, STATUS_STRMAX - 1, "<time start='%.5f' elapsed='%.3f' />",start_time, end_time-start_time ); |
567 snprintf(timestat, STATUS_STRMAX - 1, "<time start='%.5f' elapsed='%.3f' />",start_time, end_time-start_time ); |
564 timestat[STATUS_STRMAX-1] = '\0'; |
568 timestat[STATUS_STRMAX-1] = '\0'; |