Merged revisions 339885 via svnmerge from
authorIgor Goncharovskiy <igor.goncharovsky@gmail.com>
Sat, 8 Oct 2011 15:48:34 +0000 (15:48 +0000)
committerIgor Goncharovskiy <igor.goncharovsky@gmail.com>
Sat, 8 Oct 2011 15:48:34 +0000 (15:48 +0000)
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339885 | igorg | 2011-10-08 22:46:27 +0700 (Сбт, 08 Окт 2011) | 13 lines

  Merged revisions 339884 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8

  ........
    r339884 | igorg | 2011-10-08 22:45:20 +0700 (Сбт, 08 Окт 2011) | 7 lines

    Fix segfault in Unistim channel

    (closes issue ASTERISK-18638)
    Reported by: jonnt
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_unistim.c

index 1753365..47301f3 100644 (file)
@@ -882,6 +882,7 @@ static struct unistimsession *create_client(const struct sockaddr_in *addr_from)
 
        memcpy(&s->sin, addr_from, sizeof(struct sockaddr_in));
        get_to_address(unistimsock, &s->sout);
 
        memcpy(&s->sin, addr_from, sizeof(struct sockaddr_in));
        get_to_address(unistimsock, &s->sout);
+       sout.sin_family = AF_INET;
        if (unistimdebug) {
                ast_verb(0, "Creating a new entry for the phone from %s received via server ip %s\n",
                         ast_inet_ntoa(addr_from->sin_addr), ast_inet_ntoa(s->sout.sin_addr));
        if (unistimdebug) {
                ast_verb(0, "Creating a new entry for the phone from %s received via server ip %s\n",
                         ast_inet_ntoa(addr_from->sin_addr), ast_inet_ntoa(s->sout.sin_addr));