|
|
|
@ -49,7 +49,7 @@ void parse_response(AMI *ami, const char *buffer, int *incomplete){
|
|
|
|
|
arg->key = (char *) calloc(1, len + 1); |
|
|
|
|
strncpy(arg->key, buffer, len); |
|
|
|
|
buffer = buffer + len + 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// action command
|
|
|
|
|
if(!strcmp(arg->key, "Output")){ |
|
|
|
|
size_t len = strlen(buffer); |
|
|
|
@ -103,7 +103,10 @@ void parse_response(AMI *ami, const char *buffer, int *incomplete){
|
|
|
|
|
|
|
|
|
|
RESPONSE *login = ami_response_create(); |
|
|
|
|
memcpy(login, p_action->response, sizeof(RESPONSE)); |
|
|
|
|
ami_action_free(p_action); |
|
|
|
|
// ami_action_free(p_action);
|
|
|
|
|
free( p_action->actionid ); |
|
|
|
|
ami_event_free(p_action->events); |
|
|
|
|
free( p_action ); |
|
|
|
|
if(ami->asterisk.response_login){ |
|
|
|
|
ami_response_free( ami->asterisk.response_login ); |
|
|
|
|
} |
|
|
|
@ -112,10 +115,8 @@ void parse_response(AMI *ami, const char *buffer, int *incomplete){
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ami_action_add( &ami->actions, p_action ); |
|
|
|
|
pthread_mutex_unlock(&ami->thread.mutex_actions); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|