Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Branch 4.4] Cannot save location after resuming a transaction that has been paused by avapi_async_relay #621

Closed
qmphan opened this issue May 14, 2016 · 0 comments

Comments

@qmphan
Copy link
Contributor

qmphan commented May 14, 2016

Console log:
9(27) INFO: <script>: preparing to resume transaction for processing: 6118 / 1144728330 / resume_auth
9(27) ERROR: <script>: Saving location
9(27) ERROR: [db.c:452]: db_use_table(): invalid parameter value
9(27) ERROR: usrloc [ucontact.c:1137]: db_update_ucontact_ruid(): sql use_table failed
9(27) ERROR: usrloc [ucontact.c:1658]: update_contact_db(): failed to update database
9(27) ERROR: registrar [save.c:776]: update_contacts(): failed to update contact

Config script snipset:

route[authenticate] {
    if (!$aU) {
        xlog("REGISTER without aU = $aU");
        www_challenge("$fd", "0");
        exit;
    }
    evapi_async_relay("{'tindex': $T(id_index), 'tlabel': $T(id_label), 'method': 'authenticate', 'route': 'resume_auth',"
        "'data': { 'si': '$si', 'fU': '$fU', 'fd': '$fd', 'rU': '$rU', 'aU': '$aU', 'rd': '$rd' }"
        "}"
    );
    xlog("L_INFO", "suspended transaction: $T(id_index) / $T(id_label)\n");
    exit;
}

route[resume_auth] {
        xlog("Saving location\n");
        if (!save("location")) {
            sl_reply_error();
        }
        exit;
}

event_route[evapi:message-received] {
    xlog("received [$evapi(msg)] from $evapi(srcaddr):$evapi(srcport)\n");
    jansson_get("tindex", "$evapi(msg)", "$var(tindex)");
    jansson_get("tlabel", "$evapi(msg)", "$var(tlabel)");
    jansson_get("route", "$evapi(msg)", "$var(next_route)");
    xlog("L_INFO", "preparing to resume transaction for processing: $var(tindex) / $var(tlabel) / $var(next_route)\n");
    t_continue("$var(tindex)", "$var(tlabel)", "$var(next_route)");
}
@qmphan qmphan closed this as completed May 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant