diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-07-19 23:55:43 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-07-19 23:55:43 +0000 |
commit | 0be59a11de7df845ebf656d53c4d5b111845d9f2 (patch) | |
tree | 99d911164f1eac11c77c324f2da15a65aa541917 /channels | |
parent | 63b67950550c96ec5d6ee443386c319501986236 (diff) |
simple fix for bug #3638
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 542a762ab..e19145cdd 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6221,12 +6221,13 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme } else of += 4; /* Get just the username part */ - if ((c = strchr(of, '@'))) + if ((c = strchr(of, '@'))) { *c = '\0'; - if ((c = strchr(of, ':'))) - *c = '\0'; - ast_copy_string(p->cid_num, of, sizeof(p->cid_num)); - ast_shrink_phone_number(p->cid_num); + if ((c = strchr(of, ':'))) + *c = '\0'; + ast_copy_string(p->cid_num, of, sizeof(p->cid_num)); + ast_shrink_phone_number(p->cid_num); + } if (*calleridname) ast_copy_string(p->cid_name, calleridname, sizeof(p->cid_name)); if (ast_strlen_zero(of)) |