You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ngx-c-handler has built in allocation memory management, it will be auto free for every session request.
Sample:
intgetProfile(FCGX_Request*request, csif_t*session) {
int*newId= (char*)csif_alloc(session, sizeof(int));
flog_info("%s\n", "you reach here with get Request");
if (session->query_str) {
char*userID= (char*) csif_getParam("userId", session->query_str);
if (userID) {
*newId=atoi(userID);
write_out("This user %s has new id= %d\n", userID, *newId); // the param @userId
}
}
return1; // return 1 to make finished request.
}