Minor fix for SIP authentication
authorMark Spencer <markster@digium.com>
Tue, 17 Jun 2003 16:36:24 +0000 (16:36 +0000)
committerMark Spencer <markster@digium.com>
Tue, 17 Jun 2003 16:36:24 +0000 (16:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1101 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 87f179f..6d87a50 100755 (executable)
@@ -2984,6 +2984,7 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, char *randdata
                char resp_hash[256];
                char tmp[256] = "";
                char *c;
+               char *z;
                char *response ="";
                char *resp_uri ="";
 
@@ -3021,7 +3022,7 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, char *randdata
                                }
 
                        } else
-                               c = strchr(c, ',');
+                               if ((z = strchr(c,' ')) || (z = strchr(c,','))) c=z;
                        if (c)
                                c++;
                }