|
|
|
@ -207,6 +207,7 @@ cleanup:
|
|
|
|
|
status_free(s);
|
|
|
|
|
return result;
|
|
|
|
|
failed:
|
|
|
|
|
if( !g_server->develop ) { goto discard; }
|
|
|
|
|
result = false;
|
|
|
|
|
goto cleanup;
|
|
|
|
|
}
|
|
|
|
@ -231,6 +232,7 @@ cleanup:
|
|
|
|
|
account_free(reactor);
|
|
|
|
|
return result;
|
|
|
|
|
failed:
|
|
|
|
|
if( !g_server->develop ) { goto discard; }
|
|
|
|
|
result = false;
|
|
|
|
|
goto cleanup;
|
|
|
|
|
}
|
|
|
|
@ -325,6 +327,7 @@ cleanup:
|
|
|
|
|
account_free(a);
|
|
|
|
|
return result;
|
|
|
|
|
failed:
|
|
|
|
|
if( !g_server->develop ) { goto discard; }
|
|
|
|
|
result = false;
|
|
|
|
|
goto cleanup;
|
|
|
|
|
}
|
|
|
|
@ -455,6 +458,7 @@ cleanup:
|
|
|
|
|
status_free(s);
|
|
|
|
|
return result;
|
|
|
|
|
failed:
|
|
|
|
|
if( !g_server->develop ) { goto discard; }
|
|
|
|
|
result = false;
|
|
|
|
|
goto cleanup;
|
|
|
|
|
}
|
|
|
|
@ -557,18 +561,21 @@ static bool process_one()
|
|
|
|
|
// Malformed body
|
|
|
|
|
printf( "Body: ->|%s|<-\n", env->body );
|
|
|
|
|
if( !env->body || !*env->body || ( 0 == strncmp("null",env->body,4) ) ) {
|
|
|
|
|
printf( "Malformed body, discarding\n" );
|
|
|
|
|
printf( "!!! Malformed body, discarding\n" );
|
|
|
|
|
goto discard;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Load activity
|
|
|
|
|
printf( "Load activity...\n" );
|
|
|
|
|
FILE* f = fmemopen( env->body, strlen(env->body), "r" );
|
|
|
|
|
act = ap_object_from_FILE(f);
|
|
|
|
|
if( !act ) {
|
|
|
|
|
printf( "Failed to parse body: %s\n", env->body );
|
|
|
|
|
printf( "!!! Failed to parse body: %s\n", env->body );
|
|
|
|
|
goto failed;
|
|
|
|
|
}
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
|
|
|
|
|
printf( "Handling forwarding\n" );
|
|
|
|
|
if( handle_forward( env, act ) ) { goto discard; }
|
|
|
|
|
|
|
|
|
|
// Sanitize actor
|
|
|
|
@ -591,7 +598,11 @@ static bool process_one()
|
|
|
|
|
if( !env->validated ) { goto discard; }
|
|
|
|
|
|
|
|
|
|
printf( "Processing %d\n", id );
|
|
|
|
|
step_tail = route_activity( act );
|
|
|
|
|
if( !route_activity( act ) ) {
|
|
|
|
|
goto failed;
|
|
|
|
|
} else {
|
|
|
|
|
goto discard;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
|
printf( "\nstep_tail=%c\n", step_tail ? 'T' : 'F' );
|
|
|
|
@ -606,6 +617,7 @@ cleanup:
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
return result;
|
|
|
|
|
failed:
|
|
|
|
|
if( !g_server->develop ) { goto discard; }
|
|
|
|
|
result = false;
|
|
|
|
|
goto cleanup;
|
|
|
|
|
discard:
|
|
|
|
|