@ -154,7 +154,7 @@ struct mansession {
int inuse ; /*!< number of HTTP sessions using this entry */
int inuse ; /*!< number of HTTP sessions using this entry */
int needdestroy ; /*!< Whether an HTTP session should be destroyed */
int needdestroy ; /*!< Whether an HTTP session should be destroyed */
pthread_t waiting_thread ; /*!< Sleeping thread using this descriptor */
pthread_t waiting_thread ; /*!< Sleeping thread using this descriptor */
u nsigned long managerid ; /*!< Unique manager identifier, 0 for AMI sessions */
u int32_t managerid ; /*!< Unique manager identifier, 0 for AMI sessions */
time_t sessionstart ; /*!< Session start time */
time_t sessionstart ; /*!< Session start time */
time_t sessiontimeout ; /*!< Session timeout if HTTP */
time_t sessiontimeout ; /*!< Session timeout if HTTP */
char username [ 80 ] ; /*!< Logged in username */
char username [ 80 ] ; /*!< Logged in username */
@ -3209,7 +3209,7 @@ static char *contenttype[] = {
* the value of the mansession_id cookie ( 0 is not valid and means
* the value of the mansession_id cookie ( 0 is not valid and means
* a session on the AMI socket ) .
* a session on the AMI socket ) .
*/
*/
static struct mansession * find_session ( u nsigned long ident )
static struct mansession * find_session ( u int32_t ident )
{
{
struct mansession * s ;
struct mansession * s ;
@ -3230,7 +3230,7 @@ static struct mansession *find_session(unsigned long ident)
return s ;
return s ;
}
}
int astman_verify_session_readpermissions ( u nsigned long ident , int perm )
int astman_verify_session_readpermissions ( u int32_t ident , int perm )
{
{
int result = 0 ;
int result = 0 ;
struct mansession * s ;
struct mansession * s ;
@ -3249,7 +3249,7 @@ int astman_verify_session_readpermissions(unsigned long ident, int perm)
return result ;
return result ;
}
}
int astman_verify_session_writepermissions ( u nsigned long ident , int perm )
int astman_verify_session_writepermissions ( u int32_t ident , int perm )
{
{
int result = 0 ;
int result = 0 ;
struct mansession * s ;
struct mansession * s ;
@ -3504,7 +3504,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
char * * title , int * contentlength )
char * * title , int * contentlength )
{
{
struct mansession * s = NULL ;
struct mansession * s = NULL ;
u nsigned long ident = 0 ; /* invalid, so find_session will fail if not set through the cookie */
u int32_t ident = 0 ;
int blastaway = 0 ;
int blastaway = 0 ;
struct ast_variable * v ;
struct ast_variable * v ;
char template [ ] = " /tmp/ast-http-XXXXXX " ; /* template for temporary file */
char template [ ] = " /tmp/ast-http-XXXXXX " ; /* template for temporary file */
@ -3515,7 +3515,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
for ( v = params ; v ; v = v - > next ) {
for ( v = params ; v ; v = v - > next ) {
if ( ! strcasecmp ( v - > name , " mansession_id " ) ) {
if ( ! strcasecmp ( v - > name , " mansession_id " ) ) {
sscanf ( v - > value , " % l x" , & ident ) ;
sscanf ( v - > value , " % x" , & ident ) ;
break ;
break ;
}
}
}
}
@ -3582,7 +3582,7 @@ static struct ast_str *generic_http_callback(enum output_format format,
ast_str_append ( & out , 0 ,
ast_str_append ( & out , 0 ,
" Content-type: text/%s \r \n "
" Content-type: text/%s \r \n "
" Cache-Control: no-cache; \r \n "
" Cache-Control: no-cache; \r \n "
" Set-Cookie: mansession_id= \" %08 l x\" ; Version= \" 1 \" ; Max-Age=%d \r \n "
" Set-Cookie: mansession_id= \" %08 x\" ; Version= \" 1 \" ; Max-Age=%d \r \n "
" \r \n " ,
" \r \n " ,
contenttype [ format ] ,
contenttype [ format ] ,
s - > managerid , httptimeout ) ;
s - > managerid , httptimeout ) ;