diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-07 16:22:28 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-07 16:22:28 +0000 |
commit | 6e477f048bc1e8ce8838d1c3d2f500a7e3ccc792 (patch) | |
tree | 40492655ee6454b177bf119b8e9d1f0227e8d3c5 /channels | |
parent | a6e48d17ea47618afd77ee5e2a7d2cd8e28e14cd (diff) |
- sip_alloc failures are also caused by too few available file descriptors, so we can not
open socket for RTP (audio/video/rtcp).
Error message change to clarify.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18307 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 084ba1b5e..8304744eb 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3360,8 +3360,8 @@ static struct sip_pvt *find_call(struct sip_request *req, struct sockaddr_in *si } } ast_mutex_unlock(&iflock); - p = sip_alloc(callid, sin, 1, intended_method); - if (p) + /* Allocate new call */ + if ((p = sip_alloc(callid, sin, 1, intended_method))) ast_mutex_lock(&p->lock); return p; } @@ -5531,9 +5531,8 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth, r->callid_valid = TRUE; } /* Allocate SIP packet for registration */ - p=sip_alloc( r->callid, NULL, 0, SIP_REGISTER); - if (!p) { - ast_log(LOG_WARNING, "Unable to allocate registration call\n"); + if (!(p = sip_alloc( r->callid, NULL, 0, SIP_REGISTER))) { + ast_log(LOG_WARNING, "Unable to allocate registration transaction (memory or socket error)\n"); return 0; } if (recordhistory) @@ -9060,9 +9059,8 @@ static int sip_notify(int fd, int argc, char *argv[]) struct sip_request req; struct ast_variable *var; - p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY); - if (!p) { - ast_log(LOG_WARNING, "Unable to build sip pvt data for notify\n"); + if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY))) { + ast_log(LOG_WARNING, "Unable to build sip pvt data for notify (memory/socket error)\n"); return RESULT_FAILURE; } @@ -11752,7 +11750,7 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer) p = peer->mwipvt; } else { /* Build temporary dialog for this message */ - if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY))) + if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY))) return -1; if (create_addr_from_peer(p, peer)) { /* Maybe they're not registered, etc. */ @@ -12120,7 +12118,7 @@ static struct ast_channel *sip_request_call(const char *type, int format, void * return NULL; } if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE))) { - ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory)\n", (char *)data); + ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory or socket error)\n", (char *)data); *cause = AST_CAUSE_SWITCH_CONGESTION; return NULL; } |